Fixed bug in program that did not allow user to delete a folder after it was created due to applying security incorrectly.
This commit is contained in:
@@ -303,10 +303,10 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
try
|
||||
{
|
||||
SessionPing cmd = new SessionPing();
|
||||
cmd.SessionID = sessionID;
|
||||
DataPortal.Execute<SessionPing>(cmd);
|
||||
}
|
||||
SessionPing cmd = new SessionPing();
|
||||
cmd.SessionID = sessionID;
|
||||
DataPortal.Execute<SessionPing>(cmd);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_MyLog.Warn("Session Ping Failure", ex);
|
||||
@@ -704,6 +704,31 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public bool IsSetAdministrator(FolderInfo fi)
|
||||
{
|
||||
if (this.UserMembershipCount == 0)
|
||||
return false;
|
||||
foreach (MembershipInfo mi in this.UserMemberships)
|
||||
{
|
||||
if (mi.EndDate == string.Empty)
|
||||
{
|
||||
Dictionary<int, int> folders = new Dictionary<int, int>();
|
||||
//FolderInfo fi = FolderInfo.Get(dv.MyFolder.FolderID);
|
||||
while (fi.FolderID > 1)
|
||||
{
|
||||
folders.Add(fi.FolderID, fi.FolderID);
|
||||
fi = fi.MyParent;
|
||||
}
|
||||
folders.Add(1, 1);
|
||||
foreach (AssignmentInfo ai in mi.MyGroup.GroupAssignments)
|
||||
{
|
||||
if (folders.ContainsKey(ai.FolderID) && ai.MyRole.Name == "Set Administrator")
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public bool IsSetAdministrator(DocVersionInfo dv)
|
||||
{
|
||||
if (this.UserMembershipCount == 0)
|
||||
|
Reference in New Issue
Block a user