Implemented roles and action timestamps. Added oermissions selector and interfaces
This commit was merged in pull request #3.
This commit is contained in:
@@ -1,16 +1,20 @@
|
||||
using Microsoft.AspNetCore.Components.Authorization;
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Moonlight.Frontend.Implementations;
|
||||
using Moonlight.Frontend.Interfaces;
|
||||
using Moonlight.Frontend.Services;
|
||||
|
||||
namespace Moonlight.Frontend.Startup;
|
||||
|
||||
public partial class Startup
|
||||
{
|
||||
public void AddAuth(WebAssemblyHostBuilder builder)
|
||||
private void AddAuth(WebAssemblyHostBuilder builder)
|
||||
{
|
||||
builder.Services.AddScoped<AuthenticationStateProvider, RemoteAuthProvider>();
|
||||
builder.Services.AddAuthorizationCore();
|
||||
builder.Services.AddCascadingAuthenticationState();
|
||||
|
||||
builder.Services.AddSingleton<IPermissionProvider, PermissionProvider>();
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@ namespace Moonlight.Frontend.Startup;
|
||||
|
||||
public partial class Startup
|
||||
{
|
||||
public void AddBase(WebAssemblyHostBuilder builder)
|
||||
private void AddBase(WebAssemblyHostBuilder builder)
|
||||
{
|
||||
builder.RootComponents.Add<App>("#app");
|
||||
builder.RootComponents.Add<HeadOutlet>("head::after");
|
||||
|
||||
Reference in New Issue
Block a user