Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/26/18 13:38:05 (6 years ago)
Author:
jzenisek
Message:

#2839: improved HiveAdmin interactions:

  • collaps groups with slaves only
  • update scheduleView only if currently visible
  • made schedule scrollable for non-admins
  • changed selection backcolor
  • fixed add/delete project permission bug for non-admins
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2839_HiveProjectManagement/HeuristicLab.Services.Hive/3.3/Manager/AuthorizationManager.cs

    r15737 r15813  
    9393    // authorize if user is admin, project owner or owner of a parent project
    9494    public void AuthorizeForProjectAdministration(Guid projectId, bool parentalOwnership) {
    95       if (projectId == null) return;
     95      if (projectId == null || projectId == Guid.Empty) return;
    9696      var currentUserId = UserManager.CurrentUserId;
    9797      var pm = PersistenceManager;
     
    9999      pm.UseTransaction(() => {
    100100        List<Project> projectBranch = null;
    101         if(parentalOwnership) projectDao.GetParentProjectsById(projectId).ToList();
     101        if(parentalOwnership) projectBranch = projectDao.GetParentProjectsById(projectId).ToList();
    102102        else projectBranch = projectDao.GetCurrentAndParentProjectsById(projectId).ToList();
    103103
     
    111111    // authorize if user is admin, or owner of a parent project, for which the resources are assigned to
    112112    public void AuthorizeForProjectResourceAdministration(Guid projectId, IEnumerable<Guid> resourceIds) {
    113       if (projectId == null) return;
     113      if (projectId == null || projectId == Guid.Empty) return;
    114114      var currentUserId = UserManager.CurrentUserId;
    115115      var pm = PersistenceManager;
     
    146146    // Check if a project is authorized to use a list of resources
    147147    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;
    149149      var pm = PersistenceManager;
    150150      var assignedProjectResourceDao = pm.AssignedProjectResourceDao;
Note: See TracChangeset for help on using the changeset viewer.