| | |
| | | string message = ""; |
| | | try |
| | | { |
| | | if (!GetAllChildren(App.User.RoleId).Exists(x => x.Id == roleId)) |
| | | var RoleNodes = GetAllChildren(App.User.RoleId); |
| | | RoleNodes = RoleNodes.Where(x => x.Id != App.User.RoleId).ToList(); |
| | | if (!RoleNodes.Exists(x => x.Id == roleId) /*&& !App.User.IsRoleIdSuperAdmin(App.User.RoleId)*/) |
| | | return WebResponseContent.Instance.Error("没ææéä¿®æ¹æ¤è§è²çæéä¿¡æ¯"); |
| | | //å½åç¨æ·çæé |
| | | List<Permissions> permissions = _MenuRepository.GetPermissions(App.User.RoleId); |
| | |
| | | |
| | | } |
| | | //æ´æ°æé |
| | | _RoleAuthRepository.UpdateData(updateAuths); |
| | | _RoleAuthRepository.UpdateData(updateAuths.Where(x => x.AuthId > 0).ToList()); |
| | | //æ°å¢çæé |
| | | _RoleAuthRepository.AddData(updateAuths); |
| | | _RoleAuthRepository.AddData(updateAuths.Where(x => x.AuthId <= 0).ToList()); |
| | | |
| | | //è·åæéåæ¶çæé |
| | | int[] authIds = roleAuths.Where(x => userPermissions.Select(u => u.Id) |