- Timestamp:
- 12/11/17 16:56:19 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/Manager/AuthorizationManager.cs
r15380 r15508 27 27 using DA = HeuristicLab.Services.Hive.DataAccess; 28 28 using DT = HeuristicLab.Services.Hive.DataTransfer; 29 29 using System.Collections.Generic; 30 using System.Linq; 30 31 31 32 namespace HeuristicLab.Services.Hive { … … 87 88 var project = projectDao.GetById(projectId); 88 89 if (project == null) throw new SecurityException(NOT_AUTHORIZED); 89 if (project.OwnerUserId != UserManager.CurrentUserId 90 91 var projectTree = new List<Project>() { project }; 92 projectTree.AddRange(projectDao.GetProjectsByChildId(projectId)); 93 if(!projectTree.Select(x => x.OwnerUserId).Contains(UserManager.CurrentUserId) 90 94 && !RoleVerifier.IsInRole(HiveRoles.Administrator)) { 91 95 throw new SecurityException(NOT_AUTHORIZED);
Note: See TracChangeset
for help on using the changeset viewer.