Ignore:
Timestamp:
01/26/18 08:51:30 (3 years ago)
Author:
jzenisek
Message:

#2839

  • worked on (restricted) accessibility of hive's administration area for non-admin roles
  • adapted HiveClient & HiveAdminClient entity loading (client- & service-side)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveProjectManagement/HeuristicLab.Clients.Hive.Administrator/3.3/Views/ProjectsView.cs

    r15627 r15658  
    270270      //  selectedProject.PropertyChanged += ProjectViewContent_PropertyChanged;
    271271
    272       if (IsAuthorized(selectedProject)) {
    273         if (!tabControl.TabPages.Contains(permissionsTabPage))
    274           tabControl.TabPages.Add(permissionsTabPage);
    275         if (!tabControl.TabPages.Contains(resourcesTabPage))
    276           tabControl.TabPages.Add(resourcesTabPage);
    277       } else {
    278         if (tabControl.TabPages.Contains(permissionsTabPage))
    279           tabControl.TabPages.Remove(permissionsTabPage);
    280         if (tabControl.TabPages.Contains(resourcesTabPage))
    281           tabControl.TabPages.Remove(resourcesTabPage);
    282       }
     272      //if (IsAuthorized(selectedProject)) {
     273      //  if (!tabControl.TabPages.Contains(permissionsTabPage))
     274      //    tabControl.TabPages.Add(permissionsTabPage);
     275      //  if (!tabControl.TabPages.Contains(resourcesTabPage))
     276      //    tabControl.TabPages.Add(resourcesTabPage);
     277      //} else {
     278      //  if (tabControl.TabPages.Contains(permissionsTabPage))
     279      //    tabControl.TabPages.Remove(permissionsTabPage);
     280      //  if (tabControl.TabPages.Contains(resourcesTabPage))
     281      //    tabControl.TabPages.Remove(resourcesTabPage);
     282      //}
    283283    }
    284284
     
    416416
    417417    private bool IsAuthorized(Project project) {
    418       return project != null
    419           && UserInformation.Instance.UserExists
    420           && (project.OwnerUserId == UserInformation.Instance.User.Id || HiveRoles.CheckAdminUserPermissions());
     418      return project != null && UserInformation.Instance.UserExists;
     419          //&& (project.OwnerUserId == UserInformation.Instance.User.Id || HiveRoles.CheckAdminUserPermissions());
    421420    }
    422421
Note: See TracChangeset for help on using the changeset viewer.