- Timestamp:
- 05/03/13 13:47:27 (12 years ago)
- Location:
- branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/Manager
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/Manager/AuthorizationManager.cs
r9391 r9434 36 36 if (ServiceLocator.Instance.RoleVerifier.IsInRole(HiveRoles.Slave)) return; // slave-users can access all tasks 37 37 38 Permission permission = ServiceLocator.Instance.HiveD toDao.GetPermissionForTask(taskId, ServiceLocator.Instance.UserManager.CurrentUserId);38 Permission permission = ServiceLocator.Instance.HiveDao.GetPermissionForTask(taskId, ServiceLocator.Instance.UserManager.CurrentUserId); 39 39 if (permission == Permission.NotAllowed || (permission != DT.Convert.ToEntity(requiredPermission) && DT.Convert.ToEntity(requiredPermission) == Permission.Full)) 40 40 throw new SecurityException("Current user is not authorized to access task"); … … 42 42 43 43 public void AuthorizeForJob(Guid jobId, DT.Permission requiredPermission) { 44 Permission permission = ServiceLocator.Instance.HiveD toDao.GetPermissionForJob(jobId, ServiceLocator.Instance.UserManager.CurrentUserId);44 Permission permission = ServiceLocator.Instance.HiveDao.GetPermissionForJob(jobId, ServiceLocator.Instance.UserManager.CurrentUserId); 45 45 if (permission == Permission.NotAllowed || (permission != DT.Convert.ToEntity(requiredPermission) && DT.Convert.ToEntity(requiredPermission) == Permission.Full)) 46 46 throw new SecurityException("Current user is not authorized to access task"); … … 48 48 49 49 public void AuthorizeForResourceAdministration(Guid resourceId) { 50 Resource resource = DT.Convert.ToEntity(ServiceLocator.Instance.HiveD toDao.GetResource(resourceId));50 Resource resource = DT.Convert.ToEntity(ServiceLocator.Instance.HiveDao.GetResource(resourceId)); 51 51 if (resource.OwnerUserId != ServiceLocator.Instance.UserManager.CurrentUserId && !ServiceLocator.Instance.RoleVerifier.IsInRole(HiveRoles.Administrator)) 52 52 throw new SecurityException("Current user is not authorized to access resource"); -
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/Manager/EventManager.cs
r9391 r9434 32 32 /// </summary> 33 33 public class EventManager : IEventManager { 34 private IHiveD toDao dao {35 get { return ServiceLocator.Instance.HiveD toDao; }34 private IHiveDao dao { 35 get { return ServiceLocator.Instance.HiveDao; } 36 36 } 37 37 private IAuthorizationManager auth { -
branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/Manager/HeartbeatManager.cs
r9397 r9434 31 31 private const string MutexName = "HiveTaskSchedulingMutex"; 32 32 33 private I HiveDao dao {34 get { return ServiceLocator.Instance. HiveDao; }33 private IOptimizedHiveDao dao { 34 get { return ServiceLocator.Instance.OptimizedHiveDao; } 35 35 } 36 36 private ITaskScheduler taskScheduler {
Note: See TracChangeset
for help on using the changeset viewer.