0
votes

I am developing a Joomla custom component for my project. I have 3 user groups in my system, apart from Joomla's default user groups. Let's say, "Lab assistance", "Doctor" and "reception", and inside my component there are sections for doctor, lab assistance and reception.

Each section can only be accessed by relevant user groups. For example, a Doctor can't access the lab section, reception can only access reservations etc.

Is there any way to do this in Joomla? I know how to set permissions at the component level. But how can I set permissions inside the same component.

I can do it at the code level, by adding restrictions to either the main controller file or section controllers, but is there any way to do this within Joomla?

1

1 Answers

1
votes

I know this is a work around but in case someone encounter the same problem as I did, here is the thing what I did to get the job done.

In main controller file I catch the view name then pass it to the custom helper function. Helper function get the current logged in user's user group. I hard coded accessible areas for each user group. Then I check passed view can be access by current user's group.