public static void RevokeRight(Program program, string rightName, Schema.Role role) { // BTR 5/30/2012 -> This isn't really altering the role, so I'm removing this check //program.Plan.CheckRight(role.GetRight(Schema.RightNames.Alter)); program.Plan.CheckRight(rightName); ((ServerCatalogDeviceSession)program.CatalogDeviceSession).RevokeRightFromRole(rightName, role.ID); }
public override object InternalExecute(Program program, object[] arguments) { Schema.Role role = new Schema.Role(Schema.Object.Qualify((string)arguments[0], program.Plan.CurrentLibrary.Name)); role.Owner = program.Plan.User; role.Library = program.Plan.CurrentLibrary; ((ServerCatalogDeviceSession)program.CatalogDeviceSession).InsertRole(role); return(null); }
public override object InternalExecute(Program program, object[] arguments) { Schema.Role role = Compiler.ResolveCatalogIdentifier(program.Plan, (string)arguments[1], false) as Schema.Role; if (role != null) { SystemRevokeRightFromRoleNode.RevokeRight(program, (string)arguments[0], role); } return(null); }
public override object InternalExecute(Program program, object[] arguments) { Schema.Role role = Compiler.ResolveCatalogIdentifier(program.Plan, (string)arguments[1], true) as Schema.Role; if (role == null) { throw new CompilerException(CompilerException.Codes.RoleIdentifierExpected); } RevokeRight(program, (string)arguments[0], role); return(null); }
public override object InternalExecute(Program program, object[] arguments) { Schema.Role role = Compiler.ResolveCatalogIdentifier(program.Plan, (string)arguments[0], true) as Schema.Role; if (role == null) { throw new CompilerException(CompilerException.Codes.RoleIdentifierExpected); } program.Plan.CheckRight(role.GetRight(Schema.RightNames.Drop)); ((ServerCatalogDeviceSession)program.CatalogDeviceSession).DeleteRole(role); return(null); }
public override object InternalExecute(Program program, object[] arguments) { Schema.User user = ((ServerCatalogDeviceSession)program.CatalogDeviceSession).ResolveUser((string)arguments[0]); Schema.Role role = Compiler.ResolveCatalogIdentifier(program.Plan, (string)arguments[1], true) as Schema.Role; if (role == null) { throw new CompilerException(CompilerException.Codes.RoleIdentifierExpected); } program.Plan.CheckAuthorized(user.ID); // BTR 5/30/2012 -> This isn't really altering the role, so I'm removing this check //program.Plan.CheckRight(role.GetRight(Schema.RightNames.Alter)); ((ServerCatalogDeviceSession)program.CatalogDeviceSession).DeleteUserRole(user.ID, role.ID); return(null); }
public override object InternalExecute(Program program, object[] arguments) { Schema.Role role = Compiler.ResolveCatalogIdentifier(program.Plan, (string)arguments[0], true) as Schema.Role; return(((ServerCatalogDeviceSession)program.CatalogDeviceSession).RoleHasRight(role, (string)arguments[1])); }