Page 1 of 1

Restrict user access to components

Posted: Sat Sep 08, 2012 5:52 pm
by quiggles
In 2.5 how do you restrict access to a component when there isn't an options button where you can go and alter the permissions? Is there some work round?

Alternatively is there a way to just turn off the components menu for some user groups?

Re: Restrict user access to components

Posted: Sun Sep 09, 2012 3:48 am
by rcarey
Permissions have to be added by the component because the enforcement of the permissions occurs within the components code. That said, there is a simple solution to all-or-nothing access to a component. The extension ACL Manager does offer a feature to add two permissions to each component - a permission to configure the component, and a permission to access the component's admin interface.

If you need more permissions than those two, then you should look for an alternative component that does what you want and offers the finer-level of permissions that you need. And if you do that, politely let the component developer know that you required more permissions and had to look elsewhere.

If you just can't find the permissions you need, it is possible to add a lot of access logic to the view file (in the admin section) to enforce the logic you want. For example, the scenario you mentioned (not allowing access to a component for some groups): You can add logic in overriding the view file so that the edit form will not show if the user belongs to certain groups. Also, you can override the admin menu to enforce this logic as well. It takes some coding ability and savvy, but it can be done safely.

Re: Restrict user access to components

Posted: Mon Jun 17, 2013 2:22 pm
by alteregoanimus
Hi Rcarey,

does this refer to me too ?

I would like the registered users to have the ability to add categories to all/any modules/components from the front end ?

Is this beyond the joomla2.5 possibilities ?


Re: Restrict user access to components

Posted: Mon Jun 17, 2013 3:03 pm
by rcarey
Short answer: This approach will not restrict anyone who is assigned to a group with more privileges (manager, administrator, super) - so it will not affect you. And it does not limit what permissions a person has been granted on the front-end.

Your second question is not clear to me. For instance, modules themselves are not categorized (but they can be set to show only certain categories of data). Further, modules (at this time) are not editable from the front-end. So ... I assume you mean that you want someone to be able to create content and categories for this content through a component's front end interface. Assuming that, the change I suggested will not affect such front-end capabilities. (If you mean something else, just restate the question.)

Re: Restrict user access to components

Posted: Mon Jun 17, 2013 4:07 pm
by alteregoanimus
Thanks Rcarey for your fast reply.

You understood preaty good ! Sorry for my english.

I ment if I have categories in groups like in Jomsocial Automotive, Business, general....) or categories for ads as in adsmanager (Category 1, 2 , 3), I would prefere the registered user when establishing a new group or when adding ads to be able to make their own subcategories inbetween my categories, so they have a option more then just use one of my categories but to add a new category/subcategory ...

But so far I understood thats not possible.

Re: Restrict user access to components

Posted: Mon Jun 17, 2013 4:41 pm
by rcarey
The ability to edit a component on the front-end as well as enforcing permissions are the responsibility of the component (or of the component's developer). Joomla's and its ACL does provide the mechanism for allowing front-end editing to whatever the component should allow. If it can't be done, it is because the component has not implemented the functionality and/or the ACL actions that you want.

That said, it is possible that the component maker feels the data can be compromised or become unmanageable should they allow front-end users to create and manage all the categories they want - so they might have a reason for not offering such editing.

Re: Restrict user access to components

Posted: Mon Jun 17, 2013 4:48 pm
by alteregoanimus
guess you are right , but it would be a usefull possibility ...

Thank You !