/// <summary> /// 根据用户ID获得权限组信息 /// </summary> /// <param name="userID">用户ID</param> /// <returns></returns> public PermissionsGroupModel GetMenuPermissionsInfoByUserID(Guid userID) { T_User userM = _dal.GetDBModelInfoByID(userID); Guid[] userGroupIds = (from m in userM.T_UserGroup where !m.IfDelete && m.IfEnable select m.ID).ToArray(); PermissionsGroupModel permissionsMs = _permissionsBLL.GetHasEnablePermissionsInfoByUserGroupID(userGroupIds, PermissionsTypesEnum.Menu); return(permissionsMs); }
/// <summary> /// 根据类型和拥有权限获得权限组信息 /// </summary> /// <param name="type">权限类型</param> /// <param name="hasIDs">拥有权限</param> /// <returns>权限信息</returns> private PermissionsGroupModel GetEnablePermissionsInfoByUserGroupIDAndTypeAndHsID(PermissionsTypesEnum type, Guid[] hasIDs, PermissionsModelModeEnum mode) { List <T_Permissions> perInfos = _dal.GetPermissionsInfoByTypeAndEnable(type, true); PermissionsGroupModel tempM = new PermissionsGroupModel { Type = type, Items = PermissionsModel.GetList(perInfos, true, hasIDs, mode) }; return(tempM); }
public MResultModel GetMenuInfoByLoginUser(BaseQueryModel model) { PermissionsGroupModel resM = _bll.GetMenuPermissionsInfoByUserID(model.LoginUserID); return(MResultModel <PermissionsGroupModel> .GetSuccessResultM(resM, "查询成功")); }
public void GetPermissionsInfoByUserIDTest() { PermissionsGroupModel resM = _userBLL.GetMenuPermissionsInfoByUserID(Guid.Parse("45C2B55C-C130-45B4-8975-A7C2BA883A29")); }