Generic way to check user permissions #50
Unanswered
matthias-hiemer
asked this question in
Q&A
Replies: 1 comment
-
Hi @matthias-hiemer it seems like in the latest release, you are now able to use the BasePermission class. Hope it will help you. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there!
I'm new to Ninja Extra and was wondering how I can check for permissions in a generic way.
Checking a single permission class of type BasePermission works fine to protect an endpoint.
For Example:
But: We have multiple permissions in multiple groups in our project. So, creating boilerplate permission classes doesn't seem to be the most elegant way.
Can I do this somehow by using a BasePermission class, that takes a permission as parameter? Or do I need another concept, like another decorator?
Thanks and best regards
Matthias
Beta Was this translation helpful? Give feedback.
All reactions