Use static function to check user’s security level
Pass user security info to the panels, fix security related issues on the V button (B2015-188, B2015-193) Added static functions to check the user’s security level Use static function to check user’s security level in allowing applicability changes Use static function to check user’s security level in enabling Inserting and RO and in Editing an RO
This commit is contained in:
@@ -230,9 +230,9 @@ namespace Volian.Controls.Library
|
||||
//btnCancelRO.Enabled = ((_SavCurROLink != null) && chld.roid.Substring(0, 12).ToLower() != SavROLink.ROID.Substring(0, 12).ToLower());
|
||||
string childroid = chld.roid.ToLower() + "0000";
|
||||
childroid = childroid.Substring(0, 16);
|
||||
btnSaveRO.Enabled = ((_SavCurROLink == null) || !(childroid.Equals(SavROLink.ROID.ToLower())));
|
||||
btnSaveRO.Enabled = UserInfo.CanEdit(MyUserInfo, Mydvi) && ((_SavCurROLink == null) || !(childroid.Equals(SavROLink.ROID.ToLower()))); //added security check (UserInfo.CanEdit)
|
||||
btnCancelRO.Enabled = ((_SavCurROLink != null) && childroid != SavROLink.ROID.ToLower());
|
||||
btnGoToRO.Enabled = CanEditROs(); // Writers and Reviewers cannot edit ROs (run the RO Editor)
|
||||
btnGoToRO.Enabled = UserInfo.CanEditROs(MyUserInfo, Mydvi); // Writers and Reviewers cannot edit ROs (run the RO Editor)
|
||||
switch (chld.type)
|
||||
{
|
||||
case 1: // standard (regular) text RO type
|
||||
@@ -851,18 +851,11 @@ namespace Volian.Controls.Library
|
||||
|
||||
#endregion // utils
|
||||
|
||||
private bool CanEditROs()
|
||||
{
|
||||
// Test to see if the user is allowed to run the RO Edior
|
||||
// writers and reviewers are not allowed to run the RO Editor
|
||||
return MyUserInfo.IsAdministrator() || MyUserInfo.IsSetAdministrator(Mydvi) || MyUserInfo.IsROEditor(Mydvi);
|
||||
}
|
||||
|
||||
private string _SelectedRoidBeforeRoEditor = null;
|
||||
private void lbROId_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (tvROFST.SelectedNode == null) return;
|
||||
if (!CanEditROs()) return; // do not allow writers and reviews to run the RO Editor
|
||||
if (!UserInfo.CanEditROs(MyUserInfo, Mydvi)) return; // do not allow writers and reviews to run the RO Editor
|
||||
if (VlnSettings.ReleaseMode.Equals("DEMO"))
|
||||
{
|
||||
MessageBox.Show("Referenced Object Editor not available in the Demo version.", "PROMS Demo Version");
|
||||
|
Reference in New Issue
Block a user