Methods
CheckPermission
Checks permission for a role
Velocity
#set($permissionCheckResponse = $core_v3_permission.CheckPermission($permissionId, $userId, "%{ ApplicationId = $applicationIdArg, ApplicationTypeId = $applicationTypeIdArg, ContentId = $contentIdArg, ContentTypeId = $contentTypeIdArg }"))
JavaScript
var permissionCheckResponse = core_v3_permission.CheckPermission(permissionId, userId, { ApplicationId: applicationIdArg, ApplicationTypeId: applicationTypeIdArg, ContentId: contentIdArg, ContentTypeId: contentTypeIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
permissionId | Guid | Permission Id | Required | ||
userId | Int32 | User Id | Required | ||
ApplicationId | Guid | Application Id | Optional | ||
ApplicationTypeId | Guid | Application Type Id | Optional | ||
ContentId | Guid | Content Id | Optional | ||
ContentTypeId | Guid | Content Type Id | Optional |
Returns
List
List permissions for a role
Velocity
#set($apiListResponse = $core_v3_permission.List($roleId, "%{ ApplicationId = $applicationIdArg, GroupId = $groupIdArg }"))
JavaScript
var apiListResponse = core_v3_permission.List(roleId, { ApplicationId: applicationIdArg, GroupId: groupIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
roleId | Int32 | Role Id | Required | ||
ApplicationId | Guid | Application Id | Optional | ||
GroupId | Int32 | Group Id | Optional |
Returns
Set
Sets a permission for a role
Velocity
#set($additionalInfoResponse = $core_v3_permission.Set($isAllowed, $roleId, $permissionId, "%{ ApplicationId = $applicationIdArg, GroupId = $groupIdArg }"))
JavaScript
var additionalInfoResponse = core_v3_permission.Set(isAllowed, roleId, permissionId, { ApplicationId: applicationIdArg, GroupId: groupIdArg });
Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
isAllowed | Boolean | Is Allowed | Required | ||
roleId | Int32 | Role Id | Required | ||
permissionId | Guid | Permission Id | Required | ||
ApplicationId | Guid | Application Id | Optional | ||
GroupId | Int32 | Group Id | Optional |