Restrict user access to components

Moderators: mandville, General Support Moderators

Locked
User avatar
quiggles
Joomla! Intern
Joomla! Intern
Posts: 74
Joined: Mon Apr 28, 2008 1:14 pm

Restrict user access to components

Post by quiggles » Sat Sep 08, 2012 5:52 pm

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?

User avatar
rcarey
Joomla! Explorer
Joomla! Explorer
Posts: 471
Joined: Sat Apr 25, 2009 9:20 pm
Location: Minnesota (USA)
Contact:

Re: Restrict user access to components

Post by rcarey » Sun Sep 09, 2012 3:48 am

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.
Randy Carey -- as of 2023 I'm mostly retired in web development, but still engaged with a few Joomla projects through
Careytech Studios http://careytech.com custom development for tailored or value-added web solutions

alteregoanimus
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Feb 06, 2012 9:24 pm

Re: Restrict user access to components

Post by alteregoanimus » Mon Jun 17, 2013 2:22 pm

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 ?

Thanks

User avatar
rcarey
Joomla! Explorer
Joomla! Explorer
Posts: 471
Joined: Sat Apr 25, 2009 9:20 pm
Location: Minnesota (USA)
Contact:

Re: Restrict user access to components

Post by rcarey » Mon Jun 17, 2013 3:03 pm

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.)
Randy Carey -- as of 2023 I'm mostly retired in web development, but still engaged with a few Joomla projects through
Careytech Studios http://careytech.com custom development for tailored or value-added web solutions

alteregoanimus
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Feb 06, 2012 9:24 pm

Re: Restrict user access to components

Post by alteregoanimus » Mon Jun 17, 2013 4:07 pm

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.

User avatar
rcarey
Joomla! Explorer
Joomla! Explorer
Posts: 471
Joined: Sat Apr 25, 2009 9:20 pm
Location: Minnesota (USA)
Contact:

Re: Restrict user access to components

Post by rcarey » Mon Jun 17, 2013 4:41 pm

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.
Randy Carey -- as of 2023 I'm mostly retired in web development, but still engaged with a few Joomla projects through
Careytech Studios http://careytech.com custom development for tailored or value-added web solutions

alteregoanimus
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Mon Feb 06, 2012 9:24 pm

Re: Restrict user access to components

Post by alteregoanimus » Mon Jun 17, 2013 4:48 pm

guess you are right , but it would be a usefull possibility ...

Thank You !


Locked

Return to “Access Control List (ACL) in Joomla! 2.5”