Remove stale per-page Authorize(Roles) attributes
All 26 pages had @attribute [Authorize(Roles = "Admin,SuperAdmin")] which
conflicts with the Keycloak role sor-admin. The fallback policy in Program.cs
already enforces RequireRole("sor-admin") globally, making these attributes
redundant. Removing them fixes Access Denied for all admin pages.
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
@page "/accounts/new"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@inject UserManager<Account> UserManager
|
||||
@inject RoleManager<IdentityRole<Guid>> RoleManager
|
||||
@inject NavigationManager Nav
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/accounts/{Id:guid}"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@inject SorIdentityDbContext Db
|
||||
@inject CatalogDbContext CatalogDb
|
||||
@inject CollectionDbContext CollectionDb
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/accounts"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@inject SorIdentityDbContext Db
|
||||
@inject NavigationManager Nav
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/bazaar"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@inject BazaarDbContext Db
|
||||
|
||||
<PageTitle>Bazaar – SOR Admin</PageTitle>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@page "/bazaar/packs/new"
|
||||
@page "/bazaar/packs/{Id:guid}"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@inject BazaarDbContext Db
|
||||
@inject CatalogDbContext CatalogDb
|
||||
@inject SOR.Cdn.ICdnClient Cdn
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/bazaar/packs"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@inject BazaarDbContext Db
|
||||
@inject NavigationManager Nav
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@page "/bazaar/cosmetics/new"
|
||||
@page "/bazaar/cosmetics/{Id:guid}"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using SOR.Database.Contexts
|
||||
@using SOR.Database.Entities.Bazaar
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/bazaar/cosmetics"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using SOR.Database.Contexts
|
||||
@using SOR.Database.Enums
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@page "/bazaar/decks/new"
|
||||
@page "/bazaar/decks/{Id:guid}"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@inject BazaarDbContext Db
|
||||
@inject CatalogDbContext CatalogDb
|
||||
@inject SOR.Cdn.ICdnClient Cdn
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/bazaar/decks"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@inject BazaarDbContext Db
|
||||
|
||||
<PageTitle>Prebuilt Decks – SOR Admin</PageTitle>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/bazaar/purchases"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using SOR.Database.Contexts
|
||||
@using SOR.Database.Enums
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
@page "/cards/new"
|
||||
@page "/cards/{Id:guid}"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@implements IDisposable
|
||||
@inject CatalogDbContext Db
|
||||
@inject NavigationManager Nav
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/cards"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@inject CatalogDbContext Db
|
||||
@inject NavigationManager Nav
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/collection"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@inject CollectionDbContext CollectionDb
|
||||
@inject NavigationManager Nav
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/collection/player/{AccountId:guid}"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@inject CollectionDbContext CollectionDb
|
||||
@inject CatalogDbContext CatalogDb
|
||||
@inject SOR.Database.Contexts.SorIdentityDbContext IdentityDb
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/content/ai-assets"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using SOR.Database.Contexts
|
||||
@using SOR.Database.Entities.Catalog
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/content/audio"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using SOR.Database.Contexts
|
||||
@using SOR.Database.Entities.Catalog
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/content/cdn"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@implements IDisposable
|
||||
@using Amazon.S3
|
||||
@using Amazon.S3.Model
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/content/highlights"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using SOR.Database.Contexts
|
||||
@using SOR.Database.Entities.Catalog
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/content/skyboxes"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using SOR.Database.Contexts
|
||||
@using SOR.Database.Entities.Catalog
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/content/tile-models"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@using Amazon.S3
|
||||
@using Amazon.S3.Model
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@inject CatalogDbContext CatalogDb
|
||||
@inject SorIdentityDbContext IdentityDb
|
||||
@inject BazaarDbContext BazaarDb
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/feature-flags"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
|
||||
<PageTitle>Feature Flags – SOR Admin</PageTitle>
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/game/sessions/{Id:guid}"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using System.Text.Json
|
||||
@using SOR.Database.Contexts
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/game/sessions"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using SOR.Database.Contexts
|
||||
@using SOR.Database.Enums
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
@page "/game/matchmaking"
|
||||
@attribute [Authorize(Roles = "Admin,SuperAdmin")]
|
||||
@using Microsoft.EntityFrameworkCore
|
||||
@using SOR.Database.Contexts
|
||||
@using SOR.Database.Enums
|
||||
|
||||
Reference in New Issue
Block a user