RoleObject Class
Namespace: bcpDevKit.Entities.Configuration
Assembly: bcpDevKit.dll
Syntax
public class RoleObject
Properties
Type |
Name |
Description |
---|---|---|
Name |
Gets or sets the name of the role. |
|
Name |
Gets or sets the role description. |
|
IEnumerable<Permission> |
Name |
Gets all the roles permissions. |
Methods
Type |
Name |
Description |
---|---|---|
Name |
Creates and adds a new permission to the role if no one with the specified name exists. |
|
Name |
Retrieves the permission with the specified name if exists. |
Remarks
Examples
Assign user to specific role and add permissions:
var security = bcpService.EntitiesTable.Vault.Security;
var user = security.AddUser("Kim");
user.AddRole("Document Manager (Level 1)");
var role = security.GetRole("Document Manager (Level 1)") role.AddPermission("FileChangeCategory");
role.AddPermission("FileChangeRevision");