How do i dynamically hide and show permission by Soft Delete #2315
Replies: 2 comments
-
why I don't use the when I soft delete that permission, the user or role that has that permission will not be revoked, it still has access to that permission but in this case, permission is soft deleted then act like and when I restore that soft-deleted permission, the user/role will automatically have access to that permission without |
Beta Was this translation helpful? Give feedback.
-
You can handle that on your own implementation |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
hello, in my case I want to make a list of all permission from permission table and I have done add custom permission model like this:
And I have created the "deleted_at" column inside permission table
But when I set
(for example "access all resource" )
columndeleted_at
value to not null.The problem is when I check user auth()->user()->hasPermissionTo("access all resource") always returns true (because I have set it before and now the permission are soft deleted). how do I make
return false
when specific permission is soft deleted from the database?Thank you...
Beta Was this translation helpful? Give feedback.
All reactions