PermissionItem

[Obsolete] Represents the set of permissions a particular user or group has on a given resource

This is how you can decide to assign permissions or privileges for users to be able to access items.

PermissionItem Properties

PermissionItem

Field Type Inherited from Description
CommonName String PermissionItem Gets or sets the name of the common.
Privileges Privilege[] PermissionItem Gets or sets the privileges.
UserId String PermissionItem Gets or sets the user identifier.

JSON Structure of PermissionItem

{
   "CommonName"	:	"String",
   "Privileges"	:	"[Privilege](/object-model/privilege)[]",
   "UserId"	:	"String"
}

Get Permissions Async

Example in C#

// Returns: IEnumerable<PermissionItem>
var permissionItem = await client.GetPermissionsAsync(BaseInfo baseInfo);

Example in CURL



           curl -X GET \
               https://api.us.acresecurity.cloud/api/f/INSTANCE.KEY/RESOURCE.KEY/permissions \
               -H 'Authorization: Bearer TOKEN_GOES_HERE'
            

Remove Permissions Async

Example in C#

// Returns: nothing
await client.RemovePermissionsAsync(BaseInfo baseInfo, String userId);

Example in CURL



           curl -X DELETE \
               https://api.us.acresecurity.cloud/api/f/INSTANCE.KEY/RESOURCE.KEY/permissions/USER.KEY \
               -H 'Authorization: Bearer TOKEN_GOES_HERE'
            

Set Permissions Async

Example in C#

// Returns: nothing
await client.SetPermissionsAsync(BaseInfo baseInfo, String userId, Boolean includeChildren, Privilege privileges);

Example in CURL



           curl -X POST \
               https://api.us.acresecurity.cloud/api/f/INSTANCE.KEY/RESOURCE.KEY/permissions?includeChildren=false \
               -H 'Authorization: Bearer TOKEN_GOES_HERE' \
               -H 'Content-Type: application/json' \
               -d '{
                   "$type": "Feenics.Keep.WebApi.Model.PermissionItem, Feenics.Keep.WebApi.Model",
                   "UserId": "USER.KEY",
                   "Privileges": ["Read", "Update"]
               }'