Roles
Last updated
Last updated
Roles
are used to manage Permissions
in intratool.
The binding of Permissions
to a Role
is done by a pivot table called permission_role
, in which each Permission
of the unique Role
is assigned.
Those Roles
will then get assigned to a so that every member of a has the same Permissions
.
Alias
role
Relations
user
Belongs to
user_id
department
Belongs to
department_id
folder
Belongs to
folder_id
departments
Belongs to many
Intermediate table
infoboardDepartments
Belongs to many
Intermediate table
permissions
Belongs to many
Intermediate table
users
Has many
users.role_id
Get a list of all Roles
.
Definition
GET
/api/roles
Example Request
Example Response
Show a single Role
by id
.
Definition
GET
/api/roles/{id}
Example Request
Example Response
Create a new Role
.
Definition
POST
/api/roles
Request Keys
department_id
*
integer
-
name
*
string
-
The name of the Role.
active
boolean
true
Whether the Role
is active.
permissions_ids
*
array
-
department_ids
array
Related Department
infoboard_department_ids
array
Related Department
folder_id
integer
-
location_key
string
-
The location description of the Role
.
sort_number
integer
Current highest +1
Keys with *
are required.
Example Request
Example Response
Update an existing Role
by id
.
Definition
PUT
/api/roles/{id}
Request Keys
department_id
integer
name
string
The name of the Role.
active
boolean
Whether the Role
is active.
permissions_ids
array
department_ids
array
infoboard_department_ids
array
folder_id
integer
location_key
string
The location description of the Role
.
sort_number
integer
Example Request
Example Response
Delete an existing Role
by id
.
Definition
DELETE
/api/roles/{id}
Example Request
Example Response
The ID of the the Role
is assigned to.
The IDs of to grant the Role
.
The IDs of the Role
has "advanced access" to view content from.
The IDs of the Role
is allowed to assign to.
The ID of the Role
is assigned to.
The index of the Role
related to the .
The ID of the the Role
is assigned to.
The IDs of to grant the Role
.
The IDs of the Role
has "advanced access" to view content from.
The IDs of the Role
is allowed to assign to.
The ID of the Role
is assigned to.
The index of the Role
related to the .