Just would like to get back to the original post...
The below is my code
private void setSecuritySettings()
{
//all common security settings are located in ThirdParties/CuteEditor/Configuration/Security/Default.config
//add security settings depending on user
Editor1.Setting["security:HideDirectoryList"] = buildHideDirectoryList();
}
private string buildHideDirectoryList()
{
//get group names that user is not member of
List<string> groupList = CommonDBAccess.getNonMemberGoupNames(Page.User.Identity.Name);
List<string> departmentList = GeneralDBAccess.getNonMemberDepartmentNames(Page.User.Identity.Name);
StringBuilder sb = new StringBuilder();
//hide archived and current procedures
sb.Append("/DataFiles/CMS/Procedures/Archived|/DataFiles/CMS/Procedures/Current|");
if (groupList != null)
{
//hide group folders that users is not member of
foreach (string groupName in groupList)
{
//procedures
sb.AppendFormat("/DataFiles/CMS/Procedures/Published/Group/{0}|", groupName);
//bulletin board
sb.AppendFormat("/DataFiles/CMS/BulletinBoard/Group/{0}|", groupName);
//downloadable resources
sb.AppendFormat("/Downloadable/Group/{0}|", groupName);
}
}
if (departmentList != null)
{
//hide department folders that user is not member of
foreach (string departmentName in departmentList)
{
sb.AppendFormat("/DataFiles/CMS/BulletinBoard/Department/{0}|", departmentName);
}
}
return sb.ToString();
}
There are multiple groups and user can be NON member of many so many of subfolders have to be hidden from user.
Regards,
Olga