Skip to main content

Custom User Roles - Custom API read-only User Role

14/01/2025

In this section we will guide you through creation of a customized user role with API read-only permissions set for the Default Resource and all permissions configured for the system API read-only role applicable only to one specific project.

We want to define a custom user role granting a user read-only permissions to all projects except one specific project for which we want this new role to have the same permissions as those normally granted to the system ApiUser role. In our example this will be the project ee20c10e-5ea8-4c9b-b5ce-427b160cdd76.

  1. Use GET /roles api to check the system ApiUser role first:

    check-apiuser-role-1.png
  2. Now we will execute POST /roles api; where for the Default Resource we only keep the read permissions, e.g. "corpora:read" and for the project used in our example (ee20c10e-5ea8-4c9b-b5ce-427b160cdd76) we copy all permissions (read, write, create and delete) from the system ApiUser role.

    apiUser-POST.png
  3. From this point on you can assign this new custom user role to any PoolParty user.

  4. To do so log in to your PoolParty instance and assign this role to a specific user.

    Select the desired user from the list of available users (1), then in the Authorization section click on the small arrow symbol in the Role field to open the pulldown where you can select the role you wish to assign to the selected user - in our example it is API read-only (3).

    pp-role-assignment.png

    Note

    You must be assigned appropriate permissions to be able to perform user administration tasks.