Пример #1
0
        public static bool GetOperationAllowed(OperationSymbol operationKey, bool inUserInterface)
        {
            if (!AuthLogic.IsEnabled || ExecutionMode.InGlobal)
            {
                return(true);
            }

            if (GetTemporallyAllowed(operationKey))
            {
                return(true);
            }

            OperationAllowed allowed = cache.GetAllowed(RoleEntity.Current, operationKey);

            return(allowed == OperationAllowed.Allow || allowed == OperationAllowed.DBOnly && !inUserInterface);
        }
Пример #2
0
        public static bool GetOperationAllowed(Lite <RoleEntity> role, OperationSymbol operationKey, bool inUserInterface)
        {
            OperationAllowed allowed = GetOperationAllowed(role, operationKey);

            return(allowed == OperationAllowed.Allow || allowed == OperationAllowed.DBOnly && !inUserInterface);
        }