pulsar-manager
pulsar-manager copied to clipboard
Set read/write access to resource for each role
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
-
- Added access field at role level which can have read or write as value.
-
- Added tenants field in resourceType list and will list available tenants in resource field while creating a role
-
- 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.
-
- 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.
-
- Changes in .vue file to call the hasPermissionToResource method to decide if user has access to a particular element.
Verifying this change
- [x] Make sure that the change passes the
./gradlew buildchecks.
Hi @tuteng @eolivelli please take a look.
Hi @tuteng Were you able to look into this PR? It would be a great help for us cc @sijie @merlimat