Has someone already created a CASL decorator? #1444
angelhodar
started this conversation in
Ideas
Replies: 1 comment 7 replies
-
Hey, I've created |
Beta Was this translation helpful? Give feedback.
7 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.
-
TypeGraphQL already has a built-in
Authorized
decorator that is great to use on RBAC. However, I miss some field based control to allow/disallow users to read/write certain row fields without proper permissions. For example, a user should not be able to update itsbalanceCredits
field, but an admin could do it. I am thinking about creating a decorator that uses the great casl library that could be used as theAuthorized
one, but I have doubts about what would be the performance cost of implementing it on a per field basis because the main use would be to filter fields on response based on user roleBeta Was this translation helpful? Give feedback.
All reactions