- Timestamp:
- 02/26/18 13:38:05 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive/3.3/Manager/AuthorizationManager.cs
r15737 r15813 93 93 // authorize if user is admin, project owner or owner of a parent project 94 94 public void AuthorizeForProjectAdministration(Guid projectId, bool parentalOwnership) { 95 if (projectId == null ) return;95 if (projectId == null || projectId == Guid.Empty) return; 96 96 var currentUserId = UserManager.CurrentUserId; 97 97 var pm = PersistenceManager; … … 99 99 pm.UseTransaction(() => { 100 100 List<Project> projectBranch = null; 101 if(parentalOwnership) project Dao.GetParentProjectsById(projectId).ToList();101 if(parentalOwnership) projectBranch = projectDao.GetParentProjectsById(projectId).ToList(); 102 102 else projectBranch = projectDao.GetCurrentAndParentProjectsById(projectId).ToList(); 103 103 … … 111 111 // authorize if user is admin, or owner of a parent project, for which the resources are assigned to 112 112 public void AuthorizeForProjectResourceAdministration(Guid projectId, IEnumerable<Guid> resourceIds) { 113 if (projectId == null ) return;113 if (projectId == null || projectId == Guid.Empty) return; 114 114 var currentUserId = UserManager.CurrentUserId; 115 115 var pm = PersistenceManager; … … 146 146 // Check if a project is authorized to use a list of resources 147 147 public void AuthorizeProjectForResourcesUse(Guid projectId, IEnumerable<Guid> resourceIds) { 148 if (projectId == null || resourceIds == null || !resourceIds.Any()) return;148 if (projectId == null || projectId == Guid.Empty || resourceIds == null || !resourceIds.Any()) return; 149 149 var pm = PersistenceManager; 150 150 var assignedProjectResourceDao = pm.AssignedProjectResourceDao;
Note: See TracChangeset
for help on using the changeset viewer.