diff --git a/Moonlight/App/Perms/Permissions.cs b/Moonlight/App/Perms/Permissions.cs index 77c9153c..bc74ca82 100644 --- a/Moonlight/App/Perms/Permissions.cs +++ b/Moonlight/App/Perms/Permissions.cs @@ -407,6 +407,13 @@ public static class Permissions Name = "Admin security ddos", Description = "Manage the integrated ddos protection" }; + + public static Permission AdminChangelog = new() + { + Index = 59, + Name = "Admin changelog", + Description = "View the changelog" + }; public static Permission? FromString(string name) { diff --git a/Moonlight/Shared/Components/Partials/SidebarMenu.razor b/Moonlight/Shared/Components/Partials/SidebarMenu.razor index de1240ef..59c451b2 100644 --- a/Moonlight/Shared/Components/Partials/SidebarMenu.razor +++ b/Moonlight/Shared/Components/Partials/SidebarMenu.razor @@ -14,7 +14,9 @@ - Login + + Login + } @@ -33,7 +37,9 @@ else - Dashboard + + Dashboard + - @@ -73,7 +77,9 @@ else { @@ -156,7 +180,9 @@ else - Support + + Support + + + } diff --git a/Moonlight/Shared/Views/Changelog.razor b/Moonlight/Shared/Views/Admin/Changelog.razor similarity index 96% rename from Moonlight/Shared/Views/Changelog.razor rename to Moonlight/Shared/Views/Admin/Changelog.razor index a9cf102c..03f439c4 100644 --- a/Moonlight/Shared/Views/Changelog.razor +++ b/Moonlight/Shared/Views/Admin/Changelog.razor @@ -1,8 +1,10 @@ -@page "/changelog" +@page "/admin/changelog" @using Moonlight.App.Services @inject MoonlightService MoonlightService +@attribute [PermissionRequired(nameof(Permissions.AdminChangelog))] + @{ int i = 0; }