B2108-112 Use IsAllowedToEdit in call to SetButtonEnablingForEnhanced() so that a reviewer cannot toggle out of View mode, and cannot delete from the context menu.
B2018-112 Added IsAllowedToEdit method for use in setting up the menu and context menu items
This commit is contained in:
@@ -1490,7 +1490,7 @@ namespace Volian.Controls.Library
|
||||
if (!MyItemInfo.IsEnhancedStep && !MyItemInfo.IsEnhancedSection &&
|
||||
(((MyItemInfo.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedBackgrounds) == E_PurchaseOptions.EnhancedBackgrounds) ||
|
||||
((MyItemInfo.ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedDeviations) == E_PurchaseOptions.EnhancedDeviations)))
|
||||
SetButtonEnablingForEnhanced(true);
|
||||
SetButtonEnablingForEnhanced(MyUserInfo.IsAllowedToEdit(dvi)); // B2018-112 - set context menu and ribbon buttons based on user's PROMS Security setting
|
||||
|
||||
if (dvi.VersionType > 127 || MyEditItem.MyStepPanel.VwMode == E_ViewMode.View)
|
||||
{
|
||||
@@ -1629,7 +1629,7 @@ namespace Volian.Controls.Library
|
||||
bool allowDel = false;
|
||||
EnhancedDocuments eds = MyItemInfo.GetMyEnhancedDocuments();
|
||||
// note in follow if statements, 'setting' == false when in enhanced document:
|
||||
if (!setting && MyItemInfo.IsStep && (eds == null || eds.Count == 0)) // this step is in enhanced, but not linked
|
||||
if (setting && MyItemInfo.IsStep && (eds == null || eds.Count == 0)) // this step is in enhanced, but not linked // B2018-112 and is allowed to edit
|
||||
allowDel = true; // allow delete if not linked
|
||||
btnCpyStp.Enabled = setting;
|
||||
//B20170-158 Allow a Unlinked Step to be pasted before or after a linked step.
|
||||
|
Reference in New Issue
Block a user