Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set read/write access to resource for each role #437

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sourabhaggrawal
Copy link
Contributor

@sourabhaggrawal sourabhaggrawal commented Dec 29, 2021

Motivation

Assign resource level read/write access to each role of a user. This way we can assign multiple resources to a user with read/write permission.

  • A user may exist with multiple resource access where he/she is allowed to only read a particular resource while for other resource it can make changes.*

Modifications

    1. Added access field at role level which can have read or write as value.
    1. Added tenants field in resourceType list and will list available tenants in resource field while creating a role
    1. Added access map (Map<String,Map<String,String>>) in /usersInfo response, each key is the resourceType and value holds another map with resourcename as value and value as read/write.
    1. Added hasPermissionToResource method in module/users.js which is called for each actionable element when ui is rendered to decide to show/hide the resource based on access.
    1. Changes in .vue file to call the hasPermissionToResource method to decide if user has access to a particular element.

Verifying this change

  • Make sure that the change passes the ./gradlew build checks.

@sourabhaggrawal
Copy link
Contributor Author

Hi @tuteng @eolivelli please take a look.

@skyrocknroll
Copy link
Contributor

Hi @tuteng Were you able to look into this PR? It would be a great help for us cc @sijie @merlimat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants