Add UserInfo property and modified code to assure a person with Reviewer security can only manage annotations created by themself.

Added SessionInfo property to DisplayTabControl class and managed opening and closing DisplayTabItems.
Added OwnerID and UserRole properties to DisplayTabItem class and obtained owner id and setup security based on user role when opening an item.
Added property to allow forced check in of word document to ignore any changes made by user.
Removed debug code
Added methods to setup ribbon control based on user's security role.
Added SessionInfo property and events and methods to setup proper menu items to appear on the right click of a node based on user's role and checked out status of item.
This commit is contained in:
Rich
2013-11-20 23:12:47 +00:00
parent a7562422b2
commit 50910d00b8
7 changed files with 712 additions and 156 deletions

View File

@@ -85,7 +85,12 @@ namespace Volian.Controls.Library
rtxbComment.SelectionStart = rtxbComment.TextLength; // position cursor to end of text
}
}
private UserInfo _MyUserInfo;
public UserInfo MyUserInfo
{
get { return _MyUserInfo; }
set { _MyUserInfo = value; }
}
#endregion
#region Constructors
@@ -204,8 +209,20 @@ namespace Volian.Controls.Library
}
_LoadingAnnotation = false;
AnnotationDirty = false;
if (!_LoadingGrid)
rtxbComment.Focus(); // Set the focus to the comment text
if (!_LoadingGrid)
rtxbComment.Focus(); // Set the focus to the comment text
if (MyUserInfo.IsReviewer(_CurrentItem.MyDocVersion) && CurrentAnnotation != null && CurrentAnnotation.UserID != MyUserInfo.UserID)
{
btnRemoveAnnotation.Enabled = false;
cbGridAnnoType.Enabled = false;
rtxbComment.Enabled = false;
}
else
{
btnRemoveAnnotation.Enabled = true;
cbGridAnnoType.Enabled = true;
rtxbComment.Enabled = true;
}
}
#endregion