public ModuleRepository(TenantDBContext context, IPermissionRepository Permissions, IModuleDefinitionRepository ModuleDefinitions, IServiceProvider ServiceProvider) { db = context; this.Permissions = Permissions; this.ModuleDefinitions = ModuleDefinitions; this.ServiceProvider = ServiceProvider; }
public ModuleRepository(TenantDBContext context, IPermissionRepository permissions, IModuleDefinitionRepository moduleDefinitions, IServiceProvider serviceProvider) { _db = context; _permissions = permissions; _moduleDefinitions = moduleDefinitions; _serviceProvider = serviceProvider; }
public ModuleDefinitionController(IModuleDefinitionRepository ModuleDefinitions, IInstallationManager InstallationManager, IWebHostEnvironment environment, ILogManager logger) { this.ModuleDefinitions = ModuleDefinitions; this.InstallationManager = InstallationManager; this.environment = environment; this.logger = logger; }
public ModuleController(IModuleRepository Modules, IPageModuleRepository PageModules, IModuleDefinitionRepository ModuleDefinitions, IServiceProvider ServiceProvider) { this.Modules = Modules; this.PageModules = PageModules; this.ModuleDefinitions = ModuleDefinitions; this.ServiceProvider = ServiceProvider; }
public ModuleController(IModuleRepository modules, IPageModuleRepository pageModules, IModuleDefinitionRepository moduleDefinitions, IUserPermissions userPermissions, ILogManager logger) { _modules = modules; _pageModules = pageModules; _moduleDefinitions = moduleDefinitions; _userPermissions = userPermissions; _logger = logger; }
public ModuleDefinitionController(IModuleDefinitionRepository moduleDefinitions, IUserPermissions userPermissions, IInstallationManager installationManager, IWebHostEnvironment environment, ILogManager logger) { _moduleDefinitions = moduleDefinitions; _userPermissions = userPermissions; _installationManager = installationManager; _environment = environment; _logger = logger; }
public ModuleController(IModuleRepository Modules, IPageModuleRepository PageModules, IModuleDefinitionRepository ModuleDefinitions, IUserPermissions UserPermissions, ILogManager logger) { this.Modules = Modules; this.PageModules = PageModules; this.ModuleDefinitions = ModuleDefinitions; this.UserPermissions = UserPermissions; this.logger = logger; }
public ModuleDefinitionController(IModuleDefinitionRepository moduleDefinitions, IModuleRepository modules, ITenantRepository tenants, IUserPermissions userPermissions, IInstallationManager installationManager, IWebHostEnvironment environment, IServiceProvider serviceProvider, ILogManager logger) { _moduleDefinitions = moduleDefinitions; _modules = modules; _tenants = tenants; _userPermissions = userPermissions; _installationManager = installationManager; _environment = environment; _serviceProvider = serviceProvider; _logger = logger; }
public ModuleDefinitionController(IModuleDefinitionRepository moduleDefinitions, IModuleRepository modules, IUserPermissions userPermissions, IInstallationManager installationManager, IWebHostEnvironment environment, ITenantResolver resolver, ISqlRepository sql, ILogManager logger) { _moduleDefinitions = moduleDefinitions; _modules = modules; _userPermissions = userPermissions; _installationManager = installationManager; _environment = environment; _resolver = resolver; _sql = sql; _logger = logger; }
public ModuleController(IModuleRepository modules, IPageModuleRepository pageModules, IPageRepository pages, IModuleDefinitionRepository moduleDefinitions, ISettingRepository settings, IUserPermissions userPermissions, ITenantResolver tenants, ISyncManager syncManager, ILogManager logger) { _modules = modules; _pageModules = pageModules; _pages = pages; _moduleDefinitions = moduleDefinitions; _settings = settings; _userPermissions = userPermissions; _tenants = tenants; _syncManager = syncManager; _logger = logger; }
public SiteRepository(TenantDBContext context, IRoleRepository roleRepository, IProfileRepository profileRepository, IFolderRepository folderRepository, IPageRepository pageRepository, IModuleRepository moduleRepository, IPageModuleRepository pageModuleRepository, IModuleDefinitionRepository moduleDefinitionRepository, IServiceProvider serviceProvider, IConfigurationRoot config) { _db = context; _roleRepository = roleRepository; _profileRepository = profileRepository; _folderRepository = folderRepository; _pageRepository = pageRepository; _moduleRepository = moduleRepository; _pageModuleRepository = pageModuleRepository; _moduleDefinitionRepository = moduleDefinitionRepository; _serviceProvider = serviceProvider; _config = config; }
public SiteRepository(TenantDBContext context, IRoleRepository RoleRepository, IProfileRepository ProfileRepository, IFolderRepository FolderRepository, IFileRepository FileRepository, IPageRepository PageRepository, IModuleRepository ModuleRepository, IPageModuleRepository PageModuleRepository, IModuleDefinitionRepository ModuleDefinitionRepository, IServiceProvider ServiceProvider) { db = context; this.RoleRepository = RoleRepository; this.ProfileRepository = ProfileRepository; this.FolderRepository = FolderRepository; this.FileRepository = FileRepository; this.PageRepository = PageRepository; this.ModuleRepository = ModuleRepository; this.PageModuleRepository = PageModuleRepository; this.ModuleDefinitionRepository = ModuleDefinitionRepository; this.ServiceProvider = ServiceProvider; // define the default site template SiteTemplate = new List <PageTemplate>(); SiteTemplate.Add(new PageTemplate { Name = "Home", Parent = "", Path = "", Icon = "home", IsNavigation = true, IsPersonalizable = false, EditMode = false, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"All Users;Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.HtmlText, Oqtane.Client", Title = "Welcome To Oqtane...", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"All Users;Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "<p><a href=\"https://www.oqtane.org\" target=\"_new\">Oqtane</a> is an open source <b>modular application framework</b> built from the ground up using modern .NET Core technology. It leverages the revolutionary new Blazor component model to create a <b>fully dynamic</b> web development experience which can be executed on a client or server. Whether you are looking for a platform to <b>accelerate your web development</b> efforts, or simply interested in exploring the anatomy of a large-scale Blazor application, Oqtane provides a solid foundation based on proven enterprise architectural principles.</p>" + "<p align=\"center\"><a href=\"https://www.oqtane.org\" target=\"_new\"><img src=\"oqtane.png\"></a><br /><br /><a class=\"btn btn-primary\" href=\"https://www.oqtane.org/Community\" target=\"_new\">Join Our Community</a> <a class=\"btn btn-primary\" href=\"https://github.com/oqtane/oqtane.framework\" target=\"_new\">Clone Our Repo</a><br /><br /></p>" + "<p><a href=\"https://dotnet.microsoft.com/apps/aspnet/web-apps/blazor\" target=\"_new\">Blazor</a> is a single-page app framework that lets you build interactive web applications using C# instead of JavaScript. Client-side Blazor relies on WebAssembly, an open web standard that does not require plugins or code transpilation in order to run natively in a web browser. Server-side Blazor uses SignalR to host your application on a web server and provide a responsive and robust debugging experience. Blazor applications works in all modern web browsers, including mobile browsers.</p>" + "<p>Blazor is a feature of <a href=\"https://dotnet.microsoft.com/apps/aspnet\" target=\"_new\">ASP.NET Core 3</a>, the popular cross platform web development framework from Microsoft that extends the <a href=\"https://dotnet.microsoft.com/learn/dotnet/what-is-dotnet\" target=\"_new\" >.NET developer platform</a> with tools and libraries for building web apps.</p>" }, new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.HtmlText, Oqtane.Client", Title = "MIT License", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"All Users;Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "<p>Copyright (c) 2019 .NET Foundation</p>" + "<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>" + "<p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>" + "<p>THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>" } } }); SiteTemplate.Add(new PageTemplate { Name = "My Page", Parent = "", Path = "portal", Icon = "target", IsNavigation = true, IsPersonalizable = true, EditMode = false, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"All Users;Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.HtmlText, Oqtane.Client", Title = "My Page", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"All Users;Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "<p>Oqtane offers native support for user personalized pages. If a page is identified as personalizable by the site administrator in the page settings, when an authenticated user visits the page they will see an edit button at the top right corner of the page next to their username. When they click this button the sytem will create a new version of the page and allow them to edit the page content.</p>" } } }); SiteTemplate.Add(new PageTemplate { Name = "Admin", Parent = "", Path = "admin", Icon = "", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Dashboard, Oqtane.Client", Title = "Admin Dashboard", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Site Management", Parent = "Admin", Path = "admin/sites", Icon = "globe", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Sites, Oqtane.Client", Title = "Site Management", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Page Management", Parent = "Admin", Path = "admin/pages", Icon = "layers", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Pages, Oqtane.Client", Title = "Page Management", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "User Management", Parent = "Admin", Path = "admin/users", Icon = "people", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Users, Oqtane.Client", Title = "User Management", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Profile Management", Parent = "Admin", Path = "admin/profiles", Icon = "person", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Profiles, Oqtane.Client", Title = "Profile Management", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Role Management", Parent = "Admin", Path = "admin/roles", Icon = "lock-locked", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Roles, Oqtane.Client", Title = "Role Management", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Event Log", Parent = "Admin", Path = "admin/log", Icon = "magnifying-glass", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Logs, Oqtane.Client", Title = "Event Log", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "File Management", Parent = "Admin", Path = "admin/files", Icon = "file", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Files, Oqtane.Client", Title = "File Management", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Recycle Bin", Parent = "Admin", Path = "admin/recyclebin", Icon = "trash", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.RecycleBin, Oqtane.Client", Title = "Recycle Bin", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Tenant Management", Parent = "Admin", Path = "admin/tenants", Icon = "list", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Tenants, Oqtane.Client", Title = "Tenant Management", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Module Management", Parent = "Admin", Path = "admin/modules", Icon = "browser", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.ModuleDefinitions, Oqtane.Client", Title = "Module Management", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Theme Management", Parent = "Admin", Path = "admin/themes", Icon = "brush", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Themes, Oqtane.Client", Title = "Theme Management", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Scheduled Jobs", Parent = "Admin", Path = "admin/jobs", Icon = "timer", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Jobs, Oqtane.Client", Title = "Scheduled Jobs", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Upgrade Service", Parent = "Admin", Path = "admin/upgrade", Icon = "aperture", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Upgrade, Oqtane.Client", Title = "Upgrade Service", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Login", Parent = "", Path = "login", Icon = "lock-locked", IsNavigation = false, IsPersonalizable = false, EditMode = false, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"All Users;Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Login, Oqtane.Client", Title = "User Login", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"All Users;Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Register", Parent = "", Path = "register", Icon = "person", IsNavigation = false, IsPersonalizable = false, EditMode = false, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"All Users;Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Register, Oqtane.Client", Title = "User Registration", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"All Users;Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Reset", Parent = "", Path = "reset", Icon = "person", IsNavigation = false, IsPersonalizable = false, EditMode = false, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"All Users;Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Reset, Oqtane.Client", Title = "Password Reset", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"All Users;Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); SiteTemplate.Add(new PageTemplate { Name = "Profile", Parent = "", Path = "profile", Icon = "person", IsNavigation = false, IsPersonalizable = false, EditMode = false, PagePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"All Users;Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.UserProfile, Oqtane.Client", Title = "User Profile", Pane = "Content", ModulePermissions = "[{\"PermissionName\":\"View\",\"Permissions\":\"All Users;Administrators\"},{\"PermissionName\":\"Edit\",\"Permissions\":\"Administrators\"}]", Content = "" } } }); }
public ModuleDefinitionController(IModuleDefinitionRepository ModuleDefinitions) { this.ModuleDefinitions = ModuleDefinitions; }
public ModuleDefinitionController(IModuleDefinitionRepository ModuleDefinitions, IInstallationManager InstallationManager) { this.ModuleDefinitions = ModuleDefinitions; this.InstallationManager = InstallationManager; }
public SiteRepository(TenantDBContext context, IRoleRepository roleRepository, IProfileRepository profileRepository, IFolderRepository folderRepository, IFileRepository fileRepository, IPageRepository pageRepository, IModuleRepository moduleRepository, IPageModuleRepository pageModuleRepository, IModuleDefinitionRepository moduleDefinitionRepository, IPermissionRepository permissionRepository, IServiceProvider serviceProvider, IConfigurationRoot config) { _db = context; _roleRepository = roleRepository; _profileRepository = profileRepository; _folderRepository = folderRepository; _fileRepository = fileRepository; _pageRepository = pageRepository; _moduleRepository = moduleRepository; _pageModuleRepository = pageModuleRepository; _moduleDefinitionRepository = moduleDefinitionRepository; _permissionRepository = permissionRepository; _serviceProvider = serviceProvider; _config = config; // define the default site template ( admin pages ) _pageTemplates = new List <PageTemplate>(); _pageTemplates.Add(new PageTemplate { Name = "Admin", Parent = "", Path = "admin", Icon = "", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Dashboard, Oqtane.Client", Title = "Admin Dashboard", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Site Management", Parent = "Admin", Path = "admin/sites", Icon = "globe", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Sites, Oqtane.Client", Title = "Site Management", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Site Settings", Parent = "Admin", Path = "admin/site", Icon = "home", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Site, Oqtane.Client", Title = "Site Settings", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Page Management", Parent = "Admin", Path = "admin/pages", Icon = "layers", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Pages, Oqtane.Client", Title = "Page Management", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "User Management", Parent = "Admin", Path = "admin/users", Icon = "people", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Users, Oqtane.Client", Title = "User Management", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Profile Management", Parent = "Admin", Path = "admin/profiles", Icon = "person", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Profiles, Oqtane.Client", Title = "Profile Management", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Role Management", Parent = "Admin", Path = "admin/roles", Icon = "lock-locked", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Roles, Oqtane.Client", Title = "Role Management", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Event Log", Parent = "Admin", Path = "admin/log", Icon = "magnifying-glass", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Logs, Oqtane.Client", Title = "Event Log", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "File Management", Parent = "Admin", Path = "admin/files", Icon = "file", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Files, Oqtane.Client", Title = "File Management", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Recycle Bin", Parent = "Admin", Path = "admin/recyclebin", Icon = "trash", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.RecycleBin, Oqtane.Client", Title = "Recycle Bin", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Tenant Management", Parent = "Admin", Path = "admin/tenants", Icon = "list", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Tenants, Oqtane.Client", Title = "Tenant Management", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Module Management", Parent = "Admin", Path = "admin/modules", Icon = "browser", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.ModuleDefinitions, Oqtane.Client", Title = "Module Management", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Theme Management", Parent = "Admin", Path = "admin/themes", Icon = "brush", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Themes, Oqtane.Client", Title = "Theme Management", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Scheduled Jobs", Parent = "Admin", Path = "admin/jobs", Icon = "timer", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Jobs, Oqtane.Client", Title = "Scheduled Jobs", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Upgrade Service", Parent = "Admin", Path = "admin/upgrade", Icon = "aperture", IsNavigation = false, IsPersonalizable = false, EditMode = true, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Upgrade, Oqtane.Client", Title = "Upgrade Service", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Login", Parent = "", Path = "login", Icon = "lock-locked", IsNavigation = false, IsPersonalizable = false, EditMode = false, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.View, Constants.AllUsersRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Login, Oqtane.Client", Title = "User Login", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.View, Constants.AllUsersRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Register", Parent = "", Path = "register", Icon = "person", IsNavigation = false, IsPersonalizable = false, EditMode = false, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.View, Constants.AllUsersRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Register, Oqtane.Client", Title = "User Registration", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.View, Constants.AllUsersRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Reset", Parent = "", Path = "reset", Icon = "person", IsNavigation = false, IsPersonalizable = false, EditMode = false, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.View, Constants.AllUsersRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.Reset, Oqtane.Client", Title = "Password Reset", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.View, Constants.AllUsersRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); _pageTemplates.Add(new PageTemplate { Name = "Profile", Parent = "", Path = "profile", Icon = "person", IsNavigation = false, IsPersonalizable = false, EditMode = false, PagePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.View, Constants.RegisteredRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), PageTemplateModules = new List <PageTemplateModule> { new PageTemplateModule { ModuleDefinitionName = "Oqtane.Modules.Admin.UserProfile, Oqtane.Client", Title = "User Profile", Pane = "Content", ModulePermissions = _permissionRepository.EncodePermissions(new List <Permission> { new Permission(PermissionNames.View, Constants.AdminRole, true), new Permission(PermissionNames.View, Constants.RegisteredRole, true), new Permission(PermissionNames.Edit, Constants.AdminRole, true) }), Content = "" } } }); }