- Timestamp:
- 07/10/18 23:06:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive/3.3/Manager/AuthorizationManager.cs
r15813 r15992 39 39 private const string USER_NOT_IDENTIFIED = "User could not be identified"; 40 40 private const string TASK_NOT_EXISTENT = "Queried task could not be found"; 41 private const string PROJECT_NOT_EXISTENT = "Queried project could not be found"; 41 42 42 43 private IPersistenceManager PersistenceManager { … … 98 99 var projectDao = pm.ProjectDao; 99 100 pm.UseTransaction(() => { 101 var project = projectDao.GetById(projectId); 102 if (project == null) throw new ArgumentException(PROJECT_NOT_EXISTENT); 103 if(!RoleVerifier.IsInRole(HiveRoles.Administrator) 104 && !project.ParentProjectId.HasValue) { 105 throw new SecurityException(NOT_AUTHORIZED_USERPROJECT); 106 } 107 100 108 List<Project> projectBranch = null; 101 109 if(parentalOwnership) projectBranch = projectDao.GetParentProjectsById(projectId).ToList();
Note: See TracChangeset
for help on using the changeset viewer.