Is there a way to separate classes and fields permissions depending on the type of operation? #5824
Unanswered
alexander161198
asked this question in
Q&A
Replies: 1 comment 1 reply
-
You can add the [Authorize(Policy = "AddBook")]
public async Task<MutationIdResult<int>> add_booktest_book(...) {...}
[Authorize(Policy = "DeleteBook")]
public async Task<MutationIdResult<int>> delete_booktest_book(...) {...}
[Authorize(Policy = "UpdateBook")]
public async Task<MutationIdResult<int>> update_booktest_book(...){...} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I need to separate access for classes (and fields) in different operations (read in query; update, add, delete in mutations). How can this be done? I found that I can separate access to classes and fields using the Authorization attribute, but didn't find an operation type setting.
For example, I have class Book:
and some mutations:
What can I do so that the user could have the right to read and update entities of the class or curtain field, but couldn't delete entities of this class or field? Maybe FilterFieldHandler or something?
Thank you for help.
Beta Was this translation helpful? Give feedback.
All reactions