Exemple #1
0
        /// <summary>
        /// 查询用户权限组ID列表
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        public List <PermissionGroupInfo> GetUserGroupList(string userId, string websiteOwner, int groupType)
        {
            BLLMenuPermission bllUserPmsGroupRelation = new BLLMenuPermission("");
            List <long>       groupIDList             = bllUserPmsGroupRelation.BaseCacheGetUserPmsGroupRelationList(userId)
                                                        .Select(p => p.GroupID).ToList();

            if (groupIDList.Count >= 0)
            {
                string groupIDStrs = MyStringHelper.ListToStr(groupIDList, "'", ",");
                return(GetGroupList(int.MaxValue, 1, null, websiteOwner, groupIDStrs, groupType));
            }
            return(new List <PermissionGroupInfo>());
        }
Exemple #2
0
        /// <summary>
        /// 获取站点权限关系
        /// </summary>
        /// <returns></returns>
        public List <PermissionRelationInfo> GetWebsiteOwnerRelationList(string websiteOwner, int relationType)
        {
            BLLMenuPermission bllLMenuPermission = new BLLMenuPermission("");
            List <long>       listRelation       = bllLMenuPermission.BaseCacheGetUserPmsGroupRelationList(websiteOwner)
                                                   .Select(p => p.GroupID).ToList();

            if (listRelation.Count == 0)
            {
                return(new List <PermissionRelationInfo>());
            }
            string GroupIDs = ZentCloud.Common.MyStringHelper.ListToStr(listRelation, "'", ",");

            return(GetMultPermissionRelationList(GroupIDs, relationType));
        }