ApplyPermissions()

Update user, service, or organization permissions

Description

Add or update a permission for a given user, service, and (optional) organization.

Package Details

Interface

IAccountManager

Syntax

AccountManager.ApplyPermissions(AppliedUserServicePermissionDTO userServicePermissionDTO);

Returns

Task<List<AppliedPermissionSet>>

API

Implementation Notes

Not currently available. (CurrentUser context is required)

[POST] /api/v1/account/applied-permissions

Parameters

Sample request body

{ "UserId": 0, "ServiceId": 0, "OrganizationId": 0, "Permissions": [{ "PermissionId": 0, "IsSelected": true }] }

Example

var appliedUserServicePermissionDTO = new AppliedUserServicePermissionDTO { ServiceId = 11, UserId = 100, OrganizationId = null, Permissions = new List<EditPermissionDto> { new EditPermissionDto { IsSelected = true, PermissionId = 1 } } }; await _accountManager.ApplyPermissions(appliedUserServicePermissionDTO);