Skip to content

Commit

Permalink
Merge pull request #1445 from sbwalker/dev
Browse files Browse the repository at this point in the history
create Public folder during installation
  • Loading branch information
sbwalker authored Jun 4, 2021
2 parents b7af8d0 + fab06a5 commit 970845d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Oqtane.Server/Repository/SiteRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -674,9 +674,17 @@ private void CreateSite(Site site)
new Permission(PermissionNames.Edit, RoleNames.Admin, true)
}.EncodePermissions()
});
_folderRepository.AddFolder(new Folder { SiteId = site.SiteId, ParentId = folder.FolderId, Name = "Public", Type = FolderTypes.Public, Path = Utilities.PathCombine("Public", Path.DirectorySeparatorChar.ToString()), Order = 1, IsSystem = false,
Permissions = new List<Permission>
{
new Permission(PermissionNames.Browse, RoleNames.Admin, true),
new Permission(PermissionNames.View, RoleNames.Admin, true),
new Permission(PermissionNames.Edit, RoleNames.Admin, true)
}.EncodePermissions()
});
_folderRepository.AddFolder(new Folder
{
SiteId = site.SiteId, ParentId = folder.FolderId, Name = "Users", Type = FolderTypes.Private, Path = Utilities.PathCombine("Users",Path.DirectorySeparatorChar.ToString()), Order = 1, IsSystem = true,
SiteId = site.SiteId, ParentId = folder.FolderId, Name = "Users", Type = FolderTypes.Private, Path = Utilities.PathCombine("Users",Path.DirectorySeparatorChar.ToString()), Order = 3, IsSystem = true,
Permissions = new List<Permission>
{
new Permission(PermissionNames.Browse, RoleNames.Admin, true),
Expand Down

0 comments on commit 970845d

Please sign in to comment.