[SOLVED] hide pdf button in user group

Status
Not open for further replies.

elmarra

Member
Hi everyone. I need to hide the pdf or print button from the "registered" user group in detail view and register it only for administrators. is there a way to be able to do this?
 
You can use a custom template.

But keep in mind: If the user can view the record he can always also create a PDF (if he knows how to edit the URL). There's no different access right.
 
Do you intend to use a custom template for front end side and a back end side?
Because I don't believe in front-end I can use two different templates based on the access group.
As for the link and creating the pdf is not a problem, the user will not know how to extract the pdf from the link.
 
Do you intend to use a custom template for front end side and a back end side?
No. Create one custom template and modify default_buttons.php by adding a condition to the PDF button.
 
No. Create one custom template and modify default_buttons.php by adding a condition to the PDF button.
Ah OK! do you mean to create a condition to show or hide the button based on the access level?
I find a cue somewhere to be able to change the button?
 
I use something like:

Code:
$user = JFactory::getUser();

if (in_array(number, $user->groups)) {
//the button code
}

where 'number' is the ID of group that will have access to the button
This is great and works perfectly.
But if I set the "customer" group id only with the customer group I can see and not with a super user.
is it possible to enter two group ids?
Or do it the other way around. ie hide only to a group id?
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top