Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Add permissions


Table of contents

  1. How to add permissions
  2. Demo program example
  3. Temporary Permissions
  4. Wildcards

Permissions are the actions that a user with specific role is allowed to perform within a specific resource. Sol Cerberus defines the permissions using sets of Rules, which are combinations of the three:

  • Role -> Resource -> Permission

How to add permissions

There are two ways to add permissions:

Demo program example

Rules are easier to understand using our demo program as an example.

We created 3 roles:

  • SquareMaster
  • CircleMaster
  • TriangleMaster

3 resources:

  • Square
  • Circle
  • Triangle

And the Add, Update and Delete permissions for each role’s corresponding resource:

RoleResourcePermission
SquareMasterSquareAdd
SquareMasterSquareEdit
SquareMasterSquareDelete
CircleMasterCircleAdd
CircleMasterCircleEdit
CircleMasterCircleDelete
TriangleMasterTriangleAdd
TriangleMasterTriangleEdit
TriangleMasterTriangleDelete

Temporary Permissions

Sol Cerberus supports temporary permissions. Adding an expiring date when adding permissions will make the permissions effective only until the provided date.

Wildcards

Resource and Permission can be replaced by the wildcard character * to represent all resources or permissions, for instance:

  • SquareMaster -> Square -> * (all permission on resource Square for the SquareMaster role)
  • SquareMaster -> * -> * (all permission on all resources for the SquareMaster role)