Skip to content

Commit

Permalink
- Updated login process
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanSoltis committed Jun 30, 2023
1 parent e4053df commit 398a3aa
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions ready/AzNamingTool/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
{
if (currentuser != "System")
{
<div class="w-100">@("User: " + currentuser)</div>
<div class="w-100">
@(
"User: " + currentuser
)
</div>
}
}
@if (admin)
Expand Down Expand Up @@ -105,18 +109,18 @@
{
OpenPasswordModal();
}
// Set the current user
var currentuservalue = await session.GetAsync<string>("currentuser");
if (!String.IsNullOrEmpty(currentuservalue.Value))
{
currentuser = currentuservalue.Value;
}
}

protected override async Task OnAfterRenderAsync(bool firstRender)
{
var adminresult = await session.GetAsync<bool>("admin");
admin = (bool)adminresult.Value;
// Set the current user
var currentuservalue = await session.GetAsync<string>("currentuser");
if (!String.IsNullOrEmpty(currentuservalue.Value))
{
currentuser = currentuservalue.Value;
}
if (firstRender)
{
// Check if the user has manually logged out. If so, don't attempt to identity them.
Expand Down

0 comments on commit 398a3aa

Please sign in to comment.