- Timestamp:
- 09/25/17 17:20:15 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveProjectManagement/HeuristicLab.Services.Hive/3.3/Manager/AuthorizationManager.cs
r14185 r15380 81 81 } 82 82 83 public void AuthorizeForProjectAdministration(Guid projectId) { 84 var pm = PersistenceManager; 85 var projectDao = pm.ProjectDao; 86 pm.UseTransaction(() => { 87 var project = projectDao.GetById(projectId); 88 if (project == null) throw new SecurityException(NOT_AUTHORIZED); 89 if (project.OwnerUserId != UserManager.CurrentUserId 90 && !RoleVerifier.IsInRole(HiveRoles.Administrator)) { 91 throw new SecurityException(NOT_AUTHORIZED); 92 } 93 }); 94 } 95 83 96 private DA.Permission GetPermissionForJob(IPersistenceManager pm, Guid jobId, Guid userId) { 84 97 var jobDao = pm.JobDao;
Note: See TracChangeset
for help on using the changeset viewer.