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:
@@ -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
|
||||
}
|
||||
]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user