Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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;
        }