@can blade directive #2769
Unanswered
Dayne-Valourite
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Does the
@can
blade directive work off of permissions set on the user or does it work off of the users role and the permissions assigned to that role?To add some context I have a user that is assigned the role of super-admin, this role has the ability to read-permissions, update-permissions and delete-permissions. If I remove these permissions from this user through my frontend interface then the
@can('read permissions')
blade directive should not trigger, however it still triggers. If I look into my database, that user no longer has the roles for permission read, delete or update so the blade directive should return false and not display that section of code.Beta Was this translation helpful? Give feedback.
All reactions