commit
95bab58569
@ -50,7 +50,7 @@
|
||||
if (user != null)
|
||||
{
|
||||
AuthStateProvider.NotifyAuthenticationChanged();
|
||||
UriHelper.NavigateTo(NavigateUrl(""));
|
||||
UriHelper.NavigateTo(NavigateUrl("", true));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -107,20 +107,6 @@ private async Task Refresh()
|
||||
}
|
||||
if (site != null || reload == true)
|
||||
{
|
||||
user = null;
|
||||
if (PageState == null || reload == true)
|
||||
{
|
||||
var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync();
|
||||
if (authState.User.Identity.IsAuthenticated)
|
||||
{
|
||||
user = await UserService.GetCurrentUserAsync();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
user = PageState.User;
|
||||
}
|
||||
|
||||
string path = new Uri(_absoluteUri).PathAndQuery.Substring(1);
|
||||
if (path.EndsWith("/")) { path = path.Substring(0, path.Length - 1); }
|
||||
if (alias.Path != "")
|
||||
@ -135,6 +121,20 @@ private async Task Refresh()
|
||||
reload = true;
|
||||
}
|
||||
|
||||
user = null;
|
||||
if (PageState == null || reload == true)
|
||||
{
|
||||
var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync();
|
||||
if (authState.User.Identity.IsAuthenticated)
|
||||
{
|
||||
user = await UserService.GetCurrentUserAsync();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
user = PageState.User;
|
||||
}
|
||||
|
||||
if (PageState == null || reload == true)
|
||||
{
|
||||
pages = await PageService.GetPagesAsync(site.SiteId);
|
||||
|
@ -29,6 +29,6 @@
|
||||
{
|
||||
await UserService.LogoutUserAsync();
|
||||
AuthStateProvider.NotifyAuthenticationChanged();
|
||||
UriHelper.NavigateTo(NavigateUrl(""));
|
||||
UriHelper.NavigateTo(NavigateUrl("", true));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user