Added permission checks to all controllers. Added role permission loading. Added frontend permission checks. Implemented user logout in admin panel.

This commit was merged in pull request #4.
This commit is contained in:
2026-01-16 13:07:19 +01:00
parent bee381702b
commit a28b8aca7a
24 changed files with 401 additions and 62 deletions

View File

@@ -1,6 +1,7 @@
using LucideBlazor;
using Moonlight.Frontend.Interfaces;
using Moonlight.Frontend.Models;
using Moonlight.Shared;
namespace Moonlight.Frontend.Implementations;
@@ -24,7 +25,8 @@ public sealed class SidebarProvider : ISidebarProvider
Path = "/admin",
IsExactPath = true,
Group = "Admin",
Order = 0
Order = 0,
Policy = Permissions.System.Info
},
new()
{
@@ -33,7 +35,8 @@ public sealed class SidebarProvider : ISidebarProvider
Path = "/admin/users",
IsExactPath = false,
Group = "Admin",
Order = 10
Order = 10,
Policy = Permissions.Users.View
},
new()
{
@@ -42,7 +45,8 @@ public sealed class SidebarProvider : ISidebarProvider
Path = "/admin/system",
IsExactPath = false,
Group = "Admin",
Order = 20
Order = 20,
Policy = Permissions.System.Info
}
]);
}