SecurityObject Class
Namespace: bcpDevKit.Entities.Configuration
Assembly: bcpDevKit.dll
Syntax
public abstract class SecurityObject
Properties
Type |
Name |
Description |
---|---|---|
IEnumerable<UserObject> |
Users |
Gets all the configured users. |
IEnumerable<GroupObject> |
Groups |
Gets all the configured groups. |
IEnumerable<RoleObject> |
Roles |
Gets all the configured roles (only working for Vault 2019 and above). |
Methods
Type |
Name |
Description |
---|---|---|
AddUser(string userName) |
Creates a new user if no one with the specified name exists. |
|
GetUser(string userName) |
Retrieves the user with the specified name if exists. |
|
AddGroup(string groupName) |
Creates a new group if no one with the specified name exists. |
|
GetGroup(string groupName) |
Retrieves the group with the specified name if exists. |
|
AddRole(string roleName) |
Creates a new role if no one with the specified name exists. |
|
GetRole(string roleName) |
Retrieves the role with the specified name if exists. |
|
RemoveRole(string roleName |
Removes the role if one with the specified name exists. |
Examples
Disable the export of all configuration entities
var security = bcpService.EntitiesTable.Vault.Security;
var user = security.AddUser("Angela");