Role Management
Roles are scoped by site thanks to Spatie Laravel-Permission with teams mode.
Default roles
Section titled “Default roles”| Role | Description |
|---|---|
admin | Full access to the site |
manager | Operations management |
user | Read-only access |
Create a role
Section titled “Create a role”Via the interface
Section titled “Via the interface”- Go to Administration → Roles
- Click New role
- Name the role and select permissions
- Save
Via the API
Section titled “Via the API”POST /api/v1/roles{ "name": "supervisor", "level": 50, "site_id": 1, "permissions": [ "material.viewAny", "material.view", "maintenance.viewAny", "maintenance.view", "maintenance.update", "incident.viewAny", "incident.view", "incident.update" ]}Modify a role
Section titled “Modify a role”PATCH /api/v1/roles/{id}{ "name": "supervisor", "permissions": [ "material.viewAny", "material.view", "material.update", "maintenance.*" ]}Permissions by module
Section titled “Permissions by module”See all permissions permissions page.
Delete a role
Section titled “Delete a role”DELETE /api/v1/roles/{id}