Editor1.Setting["security:HideDirectoryList"] - long list

Last post 11-29-2012, 10:26 PM by sezam. 2 replies.
Sort Posts: Previous Next
  •  01-29-2012, 6:29 PM 72863

    Editor1.Setting["security:HideDirectoryList"] - long list

    Hi!
    I dynamically create a list of directories to hide and assign it to the Cute Editor's property  like follows
    Editor1.Setting["security:HideDirectoryList"]=myList;
     
    Everything is fine until the list grows rather long.  When it becomes long I got an connection error when I click on Downloadable Files Button. This problem happens only in IE. I suspect it is due to IE limitation on request length. Is there any workaround?
     
    Thank you
  •  01-30-2012, 6:09 AM 72866 in reply to 72863

    Re: Editor1.Setting["security:HideDirectoryList"] - long list

    Hi sezam,
     
    Can you show me your folder structure(What you set for the "FilesGalleryPath"?)? And what value you set for  "security:HideDirectoryList"?
     
    Regards,
     
    Ken 
  •  11-29-2012, 10:26 PM 75374 in reply to 72866

    Re: Editor1.Setting["security:HideDirectoryList"] - long list

    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
     

View as RSS news feed in XML