B2020-048: Check in of procedure was allowed by writer when should be administrator only
This commit is contained in:
parent
9d4f7e8765
commit
aefc249fbc
@ -62,7 +62,12 @@ namespace VEPROMS
|
|||||||
sb.AppendLine(string.Format("in a VEPROMS session on computer {0} that was started on {1}", MySessionInfo.MachineName, MySessionInfo.DTSDtart.ToString("MM/dd/yyyy @ HH:mm:ss")));
|
sb.AppendLine(string.Format("in a VEPROMS session on computer {0} that was started on {1}", MySessionInfo.MachineName, MySessionInfo.DTSDtart.ToString("MM/dd/yyyy @ HH:mm:ss")));
|
||||||
lblInfo.Text = sb.ToString();
|
lblInfo.Text = sb.ToString();
|
||||||
if (MyProcedureInfo != null)
|
if (MyProcedureInfo != null)
|
||||||
btnForce.Visible = UserInfo.CanEdit(MyUserInfo,MyProcedureInfo.MyDocVersion) && MyOwnerInfo.OwnerItemID == MyProcedureInfo.ItemID;
|
{
|
||||||
|
// B2020-048: Only have force button visible if administrator or 'canedit' and current user is not a writer.
|
||||||
|
bool writerAndOtherUserIsIn = !(MySessionInfo.UserID != MyUserInfo.UserID && MyUserInfo.IsWriter(MyProcedureInfo.MyDocVersion));
|
||||||
|
bool isActiveAdministrator = MyUserInfo.IsAdministrator() || MyUserInfo.IsSetAdministrator(MyProcedureInfo.MyDocVersion);
|
||||||
|
btnForce.Visible = isActiveAdministrator || (writerAndOtherUserIsIn && UserInfo.CanEdit(MyUserInfo, MyProcedureInfo.MyDocVersion));
|
||||||
|
}
|
||||||
else
|
else
|
||||||
btnForce.Visible = MyUserInfo.IsAdministrator() || MyUserInfo.IsSetAdministrator(MySectionInfo.MyProcedure.MyDocVersion);
|
btnForce.Visible = MyUserInfo.IsAdministrator() || MyUserInfo.IsSetAdministrator(MySectionInfo.MyProcedure.MyDocVersion);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user