You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have two types of roles, the administrator and the editor. I want the editor to be able to view his/her profile only on the index page where the administrator can see all the users. Next I want the editor to be able to edit only his profile and denied any try to change other accounts. I want the administrator to have full access.
Therefore so far what i did is this
$authority->allow('manage', 'all'); for the administrator
But for the editor how i can allow him to use the index, edit, update functions of the User controller but only for his account?
One idea that I have is to check the role of the use inside of each controller and in case where the role is editor to redirect him on a specific page with an error message. Is there any other way with the authority-controller?
thank you
The text was updated successfully, but these errors were encountered:
Hello, I have two types of roles, the administrator and the editor. I want the editor to be able to view his/her profile only on the index page where the administrator can see all the users. Next I want the editor to be able to edit only his profile and denied any try to change other accounts. I want the administrator to have full access.
Therefore so far what i did is this
$authority->allow('manage', 'all'); for the administrator
But for the editor how i can allow him to use the index, edit, update functions of the User controller but only for his account?
One idea that I have is to check the role of the use inside of each controller and in case where the role is editor to redirect him on a specific page with an error message. Is there any other way with the authority-controller?
thank you
The text was updated successfully, but these errors were encountered: