private void Revoke(String privilege, String user) { RolePrivilegeBuilder builder = new RolePrivilegeBuilder(this.currentPrivilege); RolePrivilege pri = builder.Grantee(new GranteeClauseBuilder().Grantee(user)) .Build(); this.privilegeBLL.RevokeRolePrivilege(pri); }
private void ExecuteGrant(List <String> roles, String grantee, Boolean isAdmin) { if (roles.Count > 0) { foreach (String role in roles) { RolePrivilegeBuilder builder = new RolePrivilegeBuilder(role); RolePrivilege rolePrivilege = builder .Grantee(new GranteeClauseBuilder().Grantee(grantee)) .AdminOption(isAdmin).Build(); this.privilegeBLL.GrantRolePrivilege(rolePrivilege); } } }