Changes for Xylem Nanjing, ver. 3.1.1676
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using Common;
|
||||
using Config.Entities;
|
||||
using Results;
|
||||
using TBF.Resources;
|
||||
@@ -15,7 +16,7 @@ namespace TBF.UI.ResultsMI
|
||||
/// <summary>
|
||||
/// Required access rights to make changes with this form
|
||||
/// </summary>
|
||||
static readonly Users.Entities.GID[] RequiredGroupMembership = new Users.Entities.GID[] { Users.Entities.GID.TestingSpecialists, Users.Entities.GID.Metrologists };
|
||||
static readonly Common.GID[] RequiredGroupMembership = new Common.GID[] { Common.GID.TestingSpecialists, Common.GID.Metrologists };
|
||||
|
||||
public bool Unlocked; /// true = changes enabled
|
||||
|
||||
@@ -90,14 +91,14 @@ namespace TBF.UI.ResultsMI
|
||||
{
|
||||
if (!Unlocked)
|
||||
{
|
||||
if (!Users.GlobalData.CurrentUser.IsMemberOf(RequiredGroupMembership))
|
||||
if (!GlobalData.CurrentUser.IsMemberOf(RequiredGroupMembership))
|
||||
{
|
||||
if ((new Users.Forms.LoginDlg(RequiredGroupMembership)).ShowDialog() != DialogResult.OK)
|
||||
if ((new SharedDatabase.Forms.LoginDlg(RequiredGroupMembership)).ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
}
|
||||
else if (Program.LocalSettings.AlwaysAskPasswdWhenUnlocking)
|
||||
{
|
||||
if ((new Users.Forms.LoginDlg(Users.GlobalData.CurrentUser.UserName, RequiredGroupMembership)).ShowDialog() != DialogResult.OK)
|
||||
if ((new SharedDatabase.Forms.LoginDlg(GlobalData.GetCurrentUserName(), RequiredGroupMembership)).ShowDialog() != DialogResult.OK)
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user