Role based restriction in certain APIs i.e. questionSet review, publish and reject #82
Answered
by
krgauraw
githubpiyush
asked this question in
Q&A
-
Currently only Sourcing org admin or reviewer can use below APIs
We have a requirement to create similar API which can be used by Sourcing org admin or reviewer only which will update rejectComment key of the questionSet. Note :- We do have questionSet update API which can update the rejectComment key but we want the role based restriction just like the APIs mentioned above. If possible please share an example of putting such restriction to the API. CC :- @aks30 |
Beta Was this translation helpful? Give feedback.
Answered by
krgauraw
May 11, 2023
Replies: 1 comment 1 reply
-
@krgauraw Cc - @aks30 |
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
@githubpiyush if the requirement is only to update one attribute "rejectComment", I would recommend to enhance the reject api itself instead of writing a new end point.
If you still need the role mapping example, Please refer below
https://github.com/project-sunbird/sunbird-devops/blob/c0224a02b854d73bfba52a706a35fa6b47cc72aa/ansible/roles/kong-api/defaults/main.yml#LL6570C2-L6586C71
So the newly created api need to have "contentAdmin" role in api onboarding script.
cc: @sajeshkayyath @PoojaJManjooran @aks30