...
- change permissions in package.json, add new ones and edit existing
stripes-cli
Info For an overview of stripes cli commands see documentation:
https://github.com/folio-org/stripes-cli/blob/master/doc/commands.mdCode Block ## 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 $HOST$OKAPI_HOST
Note 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
Code Block |
---|
stripes perm list --user $USER --okapi $HOST$OKAPI_HOST |
assign a permission to a user
Code Block |
---|
stripes perm assign --user $USER --okapi $HOST$OKAPI_HOST --name permission.name |
unassign a permission from a user
Code Block |
---|
stripes perm unassign --user $USER --okapi $HOST$OKAPI_HOST --name permission.name |