Use static function to check user’s security level in allowing changes to step properties

Use static function to check user’s security level in allowing the insert or change of a transition
Use static function to check user’s security level in allowing the user to edit a table cell
Use static function to check user’s security level in allowing text modifications when keyboard shortcuts are used
ROEditor only security is now also considered a Reviewer.  Don’t allow a Review goto an RO (run the RO editor), Don’t allow a Reviewer toggle out of view mode from the context menu, for Reviewers, don’t allow the Enter key enter new steps and substeps.
For Reviewers, when on a table (grid) have the Enter Key move down to the next step element, don’t allow Reviewers edit a table
This commit is contained in:
2015-12-09 21:04:02 +00:00
parent d8f7b0619c
commit bc6fcfd05b
6 changed files with 160 additions and 50 deletions

View File

@@ -17,6 +17,27 @@ namespace Volian.Controls.Library
public partial class GridItem : EditItem
{
#region Fields
private DocVersionInfo _MyDVI = null;
public DocVersionInfo MyDVI
{
get
{
ItemInfo procInfo = MyItemInfo.MyProcedure as ItemInfo;
if (procInfo == null)
_MyDVI = null;
else
_MyDVI = procInfo.ActiveParent as DocVersionInfo;
return _MyDVI;
}
}
private static UserInfo _MyUserInfo = null;
public static UserInfo MyUserInfo
{
get { return _MyUserInfo; }
set { _MyUserInfo = value; }
}
private bool _IsSaving;
public bool IsSaving
{
@@ -62,7 +83,7 @@ namespace Volian.Controls.Library
if (MyStepPanel.DisplayItemChanging) return;
MyStepRTB.MyItemInfo = MyItemInfo; // should be in vlnFlexGrid
MyStepPanel.SelectedEditItem = this;
if (MyFlexGrid.IsRoTable)
if (MyFlexGrid.IsRoTable || !UserInfo.CanEdit(MyUserInfo,MyDVI));//(!MyUserInfo.IsAdministrator() && ! MyUserInfo.IsSetAdministrator(MyDVI) && !MyUserInfo.IsWriter(MyDVI)))
{
MyFlexGrid.Cols.Fixed = MyFlexGrid.Cols.Count;
MyFlexGrid.Rows.Fixed = MyFlexGrid.Rows.Count;
@@ -784,7 +805,7 @@ namespace Volian.Controls.Library
{
Focus();
MyFlexGrid.Focus();
if (!MyFlexGrid.IsRoTable) // Table ROs are none editable - don't select a table cell
if (!MyFlexGrid.IsRoTable) // Table ROs are not editable - don't select a table cell
{
try
{