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:
@@ -112,6 +112,30 @@ namespace Volian.Controls.Library
|
||||
// }
|
||||
// return sb.ToString();
|
||||
//}
|
||||
private DocVersionInfo _MyDVI = null;
|
||||
|
||||
public DocVersionInfo MyDVI
|
||||
{
|
||||
get
|
||||
{
|
||||
ItemInfo procInfo = _MyItemInfo.MyProcedure as ItemInfo; //_MyEditItem.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;
|
||||
GridItem.MyUserInfo = value;
|
||||
}
|
||||
}
|
||||
public bool IsDirty
|
||||
{
|
||||
get
|
||||
@@ -1170,13 +1194,17 @@ namespace Volian.Controls.Library
|
||||
e.Handled = true;
|
||||
break;
|
||||
case Keys.Enter:
|
||||
//if (e.Shift) return;
|
||||
//Select(Rows.Count - 1, 0);
|
||||
//_tableCellEditor.StepRTB_ArrowPressed(E_ArrowKeys.Down);
|
||||
//e.Handled = true;
|
||||
if (!e.Control && !e.Shift && !e.Alt)
|
||||
{
|
||||
OnEnterKeyPressed(sender, e);
|
||||
if (MyDVI != null && UserInfo.CanEdit(MyUserInfo,MyDVI))
|
||||
OnEnterKeyPressed(sender, e);
|
||||
else
|
||||
{
|
||||
// if a Reviewer, then do a <Ctrl><DownArrow>. Don't allow changes to a table
|
||||
if (IsRoTable) Select(Rows.Count - 1, 0);
|
||||
_tableCellEditor.StepRTB_ArrowPressed(e.Control ? E_ArrowKeys.CtrlDown : E_ArrowKeys.Down);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -4571,8 +4599,10 @@ namespace Volian.Controls.Library
|
||||
// start editing: move to cell and activate
|
||||
public void StartEditing(int row, int col)
|
||||
{
|
||||
ItemInfo pinfo = MyItemInfo.MyProcedure as ItemInfo;
|
||||
DocVersionInfo dvi = (pinfo == null) ? null : pinfo.ActiveParent as DocVersionInfo;
|
||||
_initializingEdit = true;
|
||||
ReadOnly = IsRoTable;
|
||||
ReadOnly = IsRoTable || !UserInfo.CanEdit(MyUserInfo, dvi); // reviewer cannot make changes to a table
|
||||
// save coordinates of cell being edited
|
||||
_row = row;
|
||||
_col = col;
|
||||
|
Reference in New Issue
Block a user