Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/08/18 09:43:29 (6 years ago)
Author:
jzenisek
Message:

#2839:

  • fixed refresh in resource view
  • fixed assignment/include behavior in permission view
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2839_HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectPermissionsView.cs

    r15954 r15955  
    169169    private void UpdateNewAssignedPermissions() {
    170170      for(int i = newAssignedPermissions.Count-1; i >= 0; i--) {
    171         if(newAssignedPermissions.Intersect(userGroupAncestors[newAssignedPermissions.ElementAt(i).Id]).Any()) {
     171        if(newAssignedPermissions.Intersect(userGroupAncestors[newAssignedPermissions.ElementAt(i).Id]).Any()
     172          && newAssignedPermissions.ElementAt(i).Id != Content.OwnerUserId) {
    172173          newAssignedPermissions.Remove(newAssignedPermissions.ElementAt(i));
    173174        }
     
    181182        if(userGroupDescendants.ContainsKey(item.Id)) {
    182183          foreach(var descendant in userGroupDescendants[item.Id]) {
    183             inheritedPermissions.Add(descendant);
    184             newInheritedPermissions.Add(descendant);
     184            if(!assignedPermissions.Contains(descendant)) {
     185              inheritedPermissions.Add(descendant);
     186              newInheritedPermissions.Add(descendant);
     187            }
    185188          }
    186189        }
     
    193196        if(userGroupDescendants.ContainsKey(item.Id)) {
    194197          foreach(var descendant in userGroupDescendants[item.Id]) {
    195             newInheritedPermissions.Add(descendant);
     198            if(!newAssignedPermissions.Contains(descendant))
     199              newInheritedPermissions.Add(descendant);
    196200          }
    197201        }
Note: See TracChangeset for help on using the changeset viewer.