Set

[POST] .../v1/usergrouprole/set

Adds role group. Use this method to assign a role to a user group so users in that group inherit the role's permissions. The method validates group_id and role_id, checks group-role set permission 15 for the current request user, inserts the assignment through the persistent layer and returns new_id. The request body is required, group_id and role_id must both be positive and this method changes only the group-role assignment table. Missing body, invalid ids, denied permission, duplicate assignment conflicts and database errors are returned as HTTP 200 ErrorResult business errors.

Request Parameters

Name Type Required Description
group_id Int64 Required System group ID.
role_id Int64 Required Role ID.

Request Example

{
  "group_id": 3,
  "role_id": 4
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Insert Created record result.

Response Example

{
  "ok": true,
  "result": {
    "new_id": 61
  }
}