Add role privilege details
Namespace: CelloSaaS.BusinessEdition.ServiceProxies.AccessControlManagementAssembly: CelloSaaS.BusinessEdition (in CelloSaaS.BusinessEdition.dll) Version: 4.3.1.0 (4.3.1.0)
Syntax
Parameters
- tenantIdentifier
- Type: System String
Tenant Identifier(Mandatory)
- rolePrivilege
- Type: CelloSaaS.BusinessEdition.ServiceProxies.PrivilegeService RolePrivilege
Role Privilege details(Mandatory)
Return Value
Type: StringRole privilege Identifier
Exceptions
Exception | Condition |
---|---|
System UnauthorizedAccessException | If the user has not the privilege |
System.Data DataException | If it is duplicate privilege id |
[!:CelloSaaS.ServiceContracts.AccessControlManagement.PrivilegeException] | If db exception occurs |
[!:ArgumentNullException] | If role privilege is null |
[!:ArgumentException] | If privilege id or role id is null or empty |
Examples
public void AddPrivilegeToRole() { string tenantIdentifier = "B590CD25-3093-DF11-8DEB-001EC9DAB123"; RolePrivilege rolePrivilege = new RolePrivilege(); rolePrivilege.PrivilegeId = "Add_User"; rolePrivilege.RoleId = "GR$Tenant_Admin"; string rolePrivilegeId = PrivilegeProxy.AddPrivilegeToRole(tenantIdentifier, rolePrivilege); }
See Also