fix #3065 - redirect user if they are logged in and navigating to Login page

This commit is contained in:
sbwalker 2023-08-03 12:46:42 -04:00
parent cb7fe364bc
commit 93be61e483
3 changed files with 237 additions and 234 deletions

View File

@ -11,9 +11,6 @@
<Authorizing>
<text>...</text>
</Authorizing>
<Authorized>
<div>@Localizer["Info.SignedIn"]</div>
</Authorized>
<NotAuthorized>
@if (!twofactor)
{
@ -174,6 +171,12 @@
{
await username.FocusAsync();
}
// redirect logged in user to specified page
if (PageState.User != null)
{
NavigationManager.NavigateTo(PageState.ReturnUrl);
}
}
private async Task Login()

View File

@ -231,7 +231,7 @@ namespace Oqtane.Infrastructure
new Permission(PermissionNames.View, RoleNames.Admin, true),
new Permission(PermissionNames.Edit, RoleNames.Admin, true)
},
Content = "<p>The page you requested does not exist.</p>"
Content = "<p>The page you requested does not exist or you do not have sufficient rights to view it.</p>"
}
}
});

View File

@ -640,7 +640,7 @@ namespace Oqtane.Repository
new Permission(PermissionNames.View, RoleNames.Admin, true),
new Permission(PermissionNames.Edit, RoleNames.Admin, true)
},
Content = "<p>The page you requested does not exist.</p>"
Content = "<p>The page you requested does not exist or you do not have sufficient rights to view it.</p>"
}
}
});