Assign Permission to Role (Realtime)

Assign a permission to a role in the workspace.

Method

Requires Auth

authorization:addPermissionToRole

Yes

Payload parameters

Argument

Example

Required

Description

permission-id

archive-room

Required

The id of the permission to assign

role-id

679398c4f7ca7be1b5fcf5b7

Required

The id of the role that the permission will be assigned to

Example call

{
  "msg": "method",
  "id": "22",
  "method": "authorization:addPermissionToRole",
  "params": [
    "archive-room",
    "679398c4f7ca7be1b5fcf5b7"
  ]
}

Example response

Success

{
    "msg": "updated",
    "methods": [
        "22"
    ]
}