public bool HasValidPermissions(CPrivileges privileges) { bool canExecuteCommand = false; if (this.ExecutionScope == ExecutionScope.All) { canExecuteCommand = true; } else if (this.ExecutionScope == ExecutionScope.Account) { if (privileges != null) { canExecuteCommand = true; } } else if (this.ExecutionScope == ExecutionScope.Privileges) { if (privileges != null && privileges.Has(this.RequiredPrivileges) == true) { canExecuteCommand = true; } } return(canExecuteCommand); }
public bool HasValidPermissions(CPrivileges privileges) { bool canExecuteCommand = false; if (this.ExecutionScope == ExecutionScope.All) { canExecuteCommand = true; } else if (this.ExecutionScope == ExecutionScope.Account) { if (privileges != null) { canExecuteCommand = true; } } else if (this.ExecutionScope == ExecutionScope.Privileges) { if (privileges != null && privileges.Has(this.RequiredPrivileges) == true) { canExecuteCommand = true; } } return canExecuteCommand; }