예제 #1
0
        public static QueryAllowed GetQueryAllowed(object queryName)
        {
            if (!AuthLogic.IsEnabled || ExecutionMode.InGlobal)
            {
                return(QueryAllowed.Allow);
            }

            return(cache.GetAllowed(RoleEntity.Current, queryName));
        }
예제 #2
0
    public static bool IsAuthorized(this PermissionSymbol permissionSymbol)
    {
        AssertRegistered(permissionSymbol);

        if (!AuthLogic.IsEnabled || ExecutionMode.InGlobal || cache == null)
        {
            return(true);
        }

        return(cache.GetAllowed(RoleEntity.Current, permissionSymbol));
    }
예제 #3
0
 public static PropertyAllowed GetPropertyAllowed(Lite <RoleEntity> role, PropertyRoute property)
 {
     return(cache.GetAllowed(role, property));
 }
예제 #4
0
 public static OperationAllowed GetOperationAllowed(Lite <RoleEntity> role, OperationSymbol operationKey)
 {
     return(cache.GetAllowed(role, operationKey));
 }