@inherits LayoutComponentBase @using Microsoft.AspNetCore.Components.Authorization; @using System.Security.Claims; @inject AuthenticationStateProvider AuthenticationStateProvider Overview Average Session Playtime @if (User != null && User.IsInRole("Administrator")) { Games Collections Companies Engines Genres Platforms Tags Redistributables Servers Issues Files General Users Roles Authentication User Saves Archives Media IPX Relay Servers Beacon Tools Logs Launcher Updates } General Change Password Saves Logout @Body @code { ClaimsPrincipal User; protected override async Task OnInitializedAsync() { var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync(); if (authState.User.Identity.IsAuthenticated) User = authState.User; } }