Inheritance: Seal.Model.RootEditor
Esempio n. 1
0
        string getSecuritySummary(SecurityGroup group, string folder)
        {
            StringBuilder        result = new StringBuilder();
            List <SecurityGroup> groups = new List <SecurityGroup>();

            groups.Add(group);
            string         folder2        = folder.Substring(Repository.ReportsFolder.Length);
            SecurityFolder securityFolder = FindSecurityFolder(groups, folder2);

            if (securityFolder != null)
            {
                result.AppendLine(string.Format("    Folder:'{0}' => Right:{1}; Use Sub-folders:{2}; Manage Sub-folders:{3}; Files Only:{4}\r\n", folder2, Helper.GetEnumDescription(securityFolder.FolderRight.GetType(), securityFolder.FolderRight), securityFolder.UseSubFolders ? "Yes" : "No", securityFolder.UseSubFolders && securityFolder.ManageFolder ? "Yes" : "No", securityFolder.FilesOnly ? "Yes" : "No"));
            }

            foreach (string subFolder in Directory.GetDirectories(folder))
            {
                result.Append(getSecuritySummary(group, subFolder));
            }
            return(result.ToString());
        }
Esempio n. 2
0
 /// <summary>
 /// Set defaults from a security group
 /// </summary>
 public void SetGroupConfiguration(SecurityGroup group)
 {
     //set defaults from the group
     SetDefaultCulture(group.Culture);
     SetDefaultLogoName(group.LogoName);
 }
Esempio n. 3
0
 public void SetGroupConfiguration(SecurityGroup group)
 {
     //set defaults from the group
     SetDefaultCulture(group.Culture);
     SetDefaultTheme(group.Theme);
     SetDefaultLogoName(group.LogoName);
 }
Esempio n. 4
0
 void initSecurity()
 {
     //init at least a security group
     if (_groups.Count == 0)
     {
         SecurityGroup group = new SecurityGroup() { Name = "Default Group" };
         _groups.Add(group);
         group.Folders.Add(new SecurityFolder());
     }
 }
Esempio n. 5
0
 string getSecuritySummary(SecurityGroup group, string folder)
 {
     StringBuilder result = new StringBuilder();
     List<SecurityGroup> groups = new List<SecurityGroup>();
     groups.Add(group);
     SecurityFolder securityFolder = FindSecurityFolder(groups, folder);
     if (securityFolder != null)
     {
         string pattern = string.IsNullOrEmpty(securityFolder.SearchPattern) ? "" : string.Format(", Search Pattern:{0}", securityFolder.SearchPattern);
         result.AppendLine(string.Format("    Folder:{0} (Type:{1}{2})\r\n", Repository.ConvertToRepositoryPath(folder), Helper.GetEnumDescription(securityFolder.PublicationType.GetType(), securityFolder.PublicationType), pattern));
     }
     foreach (string subFolder in Directory.GetDirectories(folder))
     {
         result.Append(getSecuritySummary(group, subFolder));
     }
     return result.ToString();
 }
Esempio n. 6
0
        string getSecuritySummary(SecurityGroup group, string folder)
        {
            StringBuilder result = new StringBuilder();
            List<SecurityGroup> groups = new List<SecurityGroup>();
            groups.Add(group);
            string folder2 = folder.Substring(Repository.ReportsFolder.Length);
            SecurityFolder securityFolder = FindSecurityFolder(groups, folder2);
            if (securityFolder != null)
            {
                result.AppendLine(string.Format("    Folder:'{0}' => Right:{1}; Use Sub-folders:{2}; Manage Sub-folders:{3};\r\n", folder2, Helper.GetEnumDescription(securityFolder.FolderRight.GetType(), securityFolder.FolderRight), securityFolder.UseSubFolders ? "Yes" : "No", securityFolder.UseSubFolders && securityFolder.ManageFolder ? "Yes" : "No"));
            }

            foreach (string subFolder in Directory.GetDirectories(folder))
            {
                result.Append(getSecuritySummary(group, subFolder));
            }
            return result.ToString();
        }