Exemple #1
0
        public List <AtomPermissionMiniModel> GetPermission(int userId)
        {
            //var list = PermissionCacher.GetIfExist(userId);
            //if (list.Any()) return list;
            var result = PermissionDataCore.GetPermission(userId);

            PermissionCacher.AddCache(userId, result);
            return(result);
        }
Exemple #2
0
        public List <AtomPermissionModel> GetPermission(string roleCode)
        {
            var list = PermissionCacher.GetIfExist(roleCode);

            if (list.Any())
            {
                return(list);
            }
            var result = PermissionDataCore.GetPermission(roleCode);

            PermissionCacher.AddCache(roleCode, result);
            return(result);
        }
Exemple #3
0
        public List <AtomPermissionModel> GetAppPermission(int userId)
        {
            var list = PermissionCacher.GetAppIfExist(userId);

            if (list.Any())
            {
                return(list);
            }
            var result = PermissionDataCore.GetAppPermission(userId);

            PermissionCacher.AddAppCache(userId, result);
            return(result);
        }