The correct way to use permissions to filter data? #2021
Answered
by
erikn69
singleseeker
asked this question in
Q&A
-
For example, We have two roles, admin and user, also a model article. admin -- could get all articles What should we do, shell we check the permission in the controller, or add a scope in the model? |
Beta Was this translation helpful? Give feedback.
Answered by
erikn69
Feb 17, 2022
Replies: 1 comment 1 reply
-
Overwrite |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
singleseeker
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overwrite
checkPermissionTo
adding your custom checklaravel-permission/src/Traits/HasPermissions.php
Line 202 in 6a3ed62