Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. change permissions in package.json, add new ones and edit existing
  2. stripes-cli

    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 of stripes mod update 


    Code 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


  3. 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
  4. If you found out the id of a specific permission, have a look at it with that request
    GET ${OKAPI_HOST}/perms/permissions/${id}

...

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