- Posts: 3
- Thank you received: 0
ACL or workaround for backend access
15 years 7 months ago #8962
by hawkestfs
ACL or workaround for backend access was created by hawkestfs
Hi,
I am aware from some other posts I read that ACL(1.6) for backend access control is a future development.
In the meantime I was wondering if anyone had any work arounds to hide access to the confuration section so that I can allow Administrator class users to edit products etc but only allow superuser class to access the configuration?
Is there a piece of PHP code I could add to the views to only show if the user is a superuser?
Suggestions anyone?
Thanks,
Ben
I am aware from some other posts I read that ACL(1.6) for backend access control is a future development.
In the meantime I was wondering if anyone had any work arounds to hide access to the confuration section so that I can allow Administrator class users to edit products etc but only allow superuser class to access the configuration?
Is there a piece of PHP code I could add to the views to only show if the user is a superuser?
Suggestions anyone?
Thanks,
Ben
Please Log in or Create an account to join the conversation.
15 years 7 months ago #8968
by nicolas
Replied by nicolas on topic Re: ACL or workaround for backend access
You could edit the file config of the view config via the menu Display->Views. There add a check like that:
$user =& JFactory::getUser();
if($user->gid==25){ // that's only for joomla 1.5
// only for super admin
}
$user =& JFactory::getUser();
if($user->gid==25){ // that's only for joomla 1.5
// only for super admin
}
Please Log in or Create an account to join the conversation.
15 years 7 months ago #9010
by hawkestfs
Replied by hawkestfs on topic Re: ACL or workaround for backend access
I'm using Joomla 1.6 - will this still work?
Thanks for the quick reply btw.
Ben
Thanks for the quick reply btw.
Ben
Please Log in or Create an account to join the conversation.
15 years 7 months ago #9033
by nicolas
Replied by nicolas on topic Re: ACL or workaround for backend access
For 1.6:
$user =& JFactory::getUser();
jimport('joomla.access.access');
$userGroups = JAccess::getGroupsByUser($user->id, true);
if(in_array(8,$userGroups)){ // that's only for joomla 1.6 and supposing that you didn't change the groups too much
// only for super admin
}
$user =& JFactory::getUser();
jimport('joomla.access.access');
$userGroups = JAccess::getGroupsByUser($user->id, true);
if(in_array(8,$userGroups)){ // that's only for joomla 1.6 and supposing that you didn't change the groups too much
// only for super admin
}
Please Log in or Create an account to join the conversation.
15 years 7 months ago #9087
by hawkestfs
Replied by hawkestfs on topic Re: ACL or workaround for backend access
Thanks that's great.
Are the save and and apply buttons going to do any thing or can I ignore those?
Cheers,
Ben
Are the save and and apply buttons going to do any thing or can I ignore those?
Cheers,
Ben
Please Log in or Create an account to join the conversation.
15 years 7 months ago #9094
by nicolas
Replied by nicolas on topic Re: ACL or workaround for backend access
They won't work. You can ignore them
Please Log in or Create an account to join the conversation.
Time to create page: 0.174 seconds