Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16032 for trunk


Ignore:
Timestamp:
07/30/18 14:23:46 (6 years ago)
Author:
fholzing
Message:

#2930: Removed permission check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Clients.OKB.Views/3.3/RunCreation/CreateFromExperimentMenuItem.cs

    r16025 r16032  
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Threading.Tasks;
    2524using HeuristicLab.Core;
    2625using HeuristicLab.MainForm;
     
    4342      IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    4443
    45       //The ToolStripItem is Disabled by default.
    46       //If any of the following conditions apply, a Check for the user privilege can be omitted.
    4744      ToolStripItem.Enabled = false;
    4845      if (activeView == null) { return; }
     
    5350      if (activeView.Locked) { return; }
    5451
    55       //Check if the user has the required OKB permissions.
    56       //In case of a server outage, a timeout may occur and the call takes a long time.
    57       //To prevent a possible UI-freeze, the permission-check is implemented as async.
    58       CheckPrivilege();
    59     }
    60 
    61     private async void CheckPrivilege() {
    62       await Task.Run(() => {
    63         IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    64         ToolStripItem.Enabled = OKBRoles.CheckUserPermissions();
    65       });
     52      ToolStripItem.Enabled = true;
    6653    }
    6754
Note: See TracChangeset for help on using the changeset viewer.