Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8043 for trunk


Ignore:
Timestamp:
06/18/12 21:32:36 (12 years ago)
Author:
ascheibe
Message:

#1648 display an error message if a user lacks the appropriate roles for the user administration

Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Clients.Access.Administration/3.3/MenuItems/UserAdministrationMenuItem.cs

    r8042 r8043  
    2020#endregion
    2121
     22using System;
    2223using System.Collections.Generic;
     24using System.Linq;
     25using System.Windows.Forms;
    2326using HeuristicLab.Optimizer;
    2427
     
    3235    }
    3336    public override void Execute() {
    34       using (UserAdministrationDialog dialog = new UserAdministrationDialog()) {
    35         dialog.ShowDialog();
     37      if (UserInformation.Instance.User.Roles.Where(x => x.Name == UserInformation.AdministratorRoleName).Count() > 0) {
     38        using (UserAdministrationDialog dialog = new UserAdministrationDialog()) {
     39          dialog.ShowDialog();
     40        }
     41      } else {
     42        MessageBox.Show("You do not seem to have the permissions to use the Access Service Administrator." + Environment.NewLine +
     43        "If that's not the case or you have any questions please write an email to support@heuristiclab.com",
     44        "Access Service Administrator", MessageBoxButtons.OK, MessageBoxIcon.Error);
    3645      }
    3746    }
  • trunk/sources/HeuristicLab.Clients.Access.Views/3.3/HeuristicLab.Clients.Access.Views-3.3.csproj

    r8042 r8043  
    106106      <DependentUpon>ClientRegistrationDialog.cs</DependentUpon>
    107107    </Compile>
    108     <Compile Include="ClientViews\ClientView.cs" />
     108    <Compile Include="ClientViews\ClientView.cs">
     109      <SubType>UserControl</SubType>
     110    </Compile>
    109111    <Compile Include="ClientViews\ClientView.Designer.cs">
    110112      <DependentUpon>ClientView.cs</DependentUpon>
     
    132134      <DependentUpon>LightweightUserGroupSelectionView.cs</DependentUpon>
    133135    </Compile>
    134     <Compile Include="UserViews\LightweightUserInformationView.cs" />
     136    <Compile Include="UserViews\LightweightUserInformationView.cs">
     137      <SubType>UserControl</SubType>
     138    </Compile>
    135139    <Compile Include="UserViews\LightweightUserInformationView.Designer.cs">
    136140      <DependentUpon>LightweightUserInformationView.cs</DependentUpon>
    137141    </Compile>
    138     <Compile Include="UserViews\RefreshableLightweightUserInformationView.cs" />
     142    <Compile Include="UserViews\RefreshableLightweightUserInformationView.cs">
     143      <SubType>UserControl</SubType>
     144    </Compile>
    139145    <Compile Include="UserViews\RefreshableLightweightUserInformationView.Designer.cs">
    140146      <DependentUpon>RefreshableLightweightUserInformationView.cs</DependentUpon>
    141147    </Compile>
    142     <Compile Include="UserViews\LightweightUserView.cs" />
     148    <Compile Include="UserViews\LightweightUserView.cs">
     149      <SubType>UserControl</SubType>
     150    </Compile>
    143151    <Compile Include="UserViews\LightweightUserView.Designer.cs">
    144152      <DependentUpon>LightweightUserView.cs</DependentUpon>
    145153    </Compile>
    146     <Compile Include="UserViews\RefreshableLightweightUserView.cs" />
     154    <Compile Include="UserViews\RefreshableLightweightUserView.cs">
     155      <SubType>UserControl</SubType>
     156    </Compile>
    147157    <Compile Include="UserViews\RefreshableLightweightUserView.Designer.cs">
    148158      <DependentUpon>RefreshableLightweightUserView.cs</DependentUpon>
    149159    </Compile>
    150     <Compile Include="UserViews\RefreshableView.cs" />
     160    <Compile Include="UserViews\RefreshableView.cs">
     161      <SubType>UserControl</SubType>
     162    </Compile>
    151163    <Compile Include="UserViews\RefreshableView.Designer.cs">
    152164      <DependentUpon>RefreshableView.cs</DependentUpon>
  • trunk/sources/HeuristicLab.Clients.Access/3.3/UserInformation.cs

    r8042 r8043  
    2525namespace HeuristicLab.Clients.Access {
    2626  public sealed class UserInformation {
     27    public const string AdministratorRoleName = "AccessService Administrator";
     28
    2729    private static UserInformation instance;
    2830    public static UserInformation Instance {
Note: See TracChangeset for help on using the changeset viewer.