Refactor host user security model, support static assets in modules and themes, module definition permissions and categories, paging control, remove SiteUsers, move seed data from script to site template for installation

This commit is contained in:
Shaun Walker
2019-09-19 16:33:48 -04:00
parent 35b9b9e89b
commit 83a212e7e3
61 changed files with 1000 additions and 979 deletions

View File

@ -6,7 +6,8 @@ namespace Oqtane.Services
{
public interface IModuleDefinitionService
{
Task<List<ModuleDefinition>> GetModuleDefinitionsAsync();
Task<List<ModuleDefinition>> GetModuleDefinitionsAsync(int SiteId);
Task UpdateModuleDefinitionAsync(ModuleDefinition ModuleDefinition);
Task InstallModulesAsync();
}
}

View File

@ -9,5 +9,7 @@ namespace Oqtane.Services
Task<List<Tenant>> GetTenantsAsync();
Task<Tenant> GetTenantAsync();
Task<Tenant> AddTenantAsync(Tenant Tenant);
}
}

View File

@ -7,7 +7,7 @@ namespace Oqtane.Services
public interface IUserRoleService
{
Task<List<UserRole>> GetUserRolesAsync();
Task<List<UserRole>> GetUserRolesAsync(int UserId);
Task<List<UserRole>> GetUserRolesAsync(int SiteId);
Task<UserRole> GetUserRoleAsync(int UserRoleId);
Task<UserRole> AddUserRoleAsync(UserRole UserRole);
Task<UserRole> UpdateUserRoleAsync(UserRole UserRole);

View File

@ -6,7 +6,7 @@ namespace Oqtane.Services
{
public interface IUserService
{
Task<List<User>> GetUsersAsync(int SiteId);
Task<List<User>> GetUsersAsync();
Task<User> GetUserAsync(int UserId, int SiteId);

View File

@ -1,39 +0,0 @@
using Oqtane.Models;
using System.Threading.Tasks;
using System.Net.Http;
using System.Linq;
using Microsoft.AspNetCore.Components;
using System.Collections.Generic;
using Oqtane.Shared;
namespace Oqtane.Services
{
public class InstallationService : ServiceBase, IInstallationService
{
private readonly HttpClient http;
private readonly SiteState sitestate;
private readonly NavigationManager NavigationManager;
public InstallationService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
{
this.http = http;
this.sitestate = sitestate;
this.NavigationManager = NavigationManager;
}
private string apiurl
{
get { return CreateApiUrl(sitestate.Alias, NavigationManager.Uri, "Installation"); }
}
public async Task<GenericResponse> IsInstalled()
{
return await http.GetJsonAsync<GenericResponse>(apiurl + "/installed");
}
public async Task<GenericResponse> Install(string connectionstring)
{
return await http.PostJsonAsync<GenericResponse>(apiurl, connectionstring);
}
}
}