Permissions workflow frontend module
Implement new permission sets
- change permissions in package.json, add new ones and edit existing
stripes-cli
For an overview of stripes cli commands see documentation:
https://github.com/folio-org/stripes-cli/blob/master/doc/commands.md## login to okapi stripes okapi login diku_admin --okapi $OKAPI_HOST --tenant diku ## update app's module descriptor stripes mod update --okapi $OKAPI_HOST ## enable the module descriptor for your tenant stripes mod enable --tenant diku --okapi $OKAPI_HOST
If you encounter a 404 error when updating the module descriptor like
OkapiError: delete: module folio_licenses-9.1.0 does not exist
use
stripes mod add
instead ofstripes mod update
After that the new AND updated permissions should be returned in the response body of the request to the perms endpoint. Note that you have to extend a preset limit, so that all permissions are returned.
GET ${OKAPI_HOST}/perms/permissions?limit=10000
- If you found out the id of a specific permission, have a look at it with that request
GET ${OKAPI_HOST}/perms/permissions/${id}
Test new permissions
list a users permission
stripes perm list --user $USER --okapi $OKAPI_HOST
assign a permission to a user
stripes perm assign --user $USER --okapi $OKAPI_HOST --name permission.name
unassign a permission from a user
stripes perm unassign --user $USER --okapi $OKAPI_HOST --name permission.name