RoleObject Class

Namespace: bcpDevKit.Entities.Configuration
Assembly: bcpDevKit.dll

Syntax

public class RoleObject

Properties

Type

Name

Description

../../../../_images/prop.ico string

Name

Gets or sets the name of the role.

../../../../_images/prop.ico string

Name

Gets or sets the role description.

../../../../_images/prop.ico IEnumerable<Permission>

Name

Gets all the roles permissions.

Methods

Type

Name

Description

../../../../_images/method.ico Permission

Name

Creates and adds a new permission to the role if no one with the specified name exists.

../../../../_images/method.ico Permission

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");