From 6072eab01d48985f8f433e13560b214a16c5664b Mon Sep 17 00:00:00 2001 From: sbwalker Date: Mon, 4 Mar 2024 08:34:10 -0500 Subject: [PATCH] allow Admin to navigate to login page --- Oqtane.Client/Modules/Admin/Login/Index.razor | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Oqtane.Client/Modules/Admin/Login/Index.razor b/Oqtane.Client/Modules/Admin/Login/Index.razor index eec57ca8..8ce6ea86 100644 --- a/Oqtane.Client/Modules/Admin/Login/Index.razor +++ b/Oqtane.Client/Modules/Admin/Login/Index.razor @@ -12,6 +12,9 @@ ... + + + @if (!twofactor) { @@ -166,12 +169,14 @@ { if (firstRender && PageState.User == null && _allowsitelogin) { - if(!string.IsNullOrEmpty(username.Id)) + if (!string.IsNullOrEmpty(username.Id)) // ensure username is visible in UI + { await username.FocusAsync(); + } } // redirect logged in user to specified page - if (PageState.User != null) + if (PageState.User != null && !UserSecurity.IsAuthorized(PageState.User, RoleNames.Admin)) { NavigationManager.NavigateTo(PageState.ReturnUrl); }