private bool hasUserEditRights(long entityId)
{
#region security permissions and authorisations check
// set edit rigths
PermissionManager permissionManager = new PermissionManager();
SubjectManager subjectManager = new SubjectManager();
Security.Services.Objects.TaskManager securityTaskManager = new Security.Services.Objects.TaskManager();
bool hasAuthenticationRigths = false;
User user = subjectManager.GetUserByName(GetUsernameOrDefault());
long userid = -1;
if (user != null)
{
userid = subjectManager.GetUserByName(GetUsernameOrDefault()).Id;
hasAuthenticationRigths = permissionManager.HasUserDataAccess(userid, 1, entityId, RightType.Update);
return (hasAuthenticationRigths);
}
else
{
return false;
}
#endregion
}