Skip to content

Commit

Permalink
Install Upgrade Wizard shows
Browse files Browse the repository at this point in the history
  • Loading branch information
ADefWebserver committed Jul 29, 2024
1 parent f068aff commit 5c5c1de
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 12 additions & 3 deletions ADefHelpDeskWebApp/Components/Layout/NavMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,20 @@
CurrentUser = (await authenticationStateTask).User;

IsAuthenticated = CurrentUser.Identity.IsAuthenticated;
IsSuperAdmin = await IsSuperUserAsync();

if (CurrentUser.Identity.IsAuthenticated)
try
{
IsAdmin = UtilitySecurity.IsAdministrator(CurrentUser.Identity.Name ?? "", strDefaultConnection);
IsSuperAdmin = await IsSuperUserAsync();

if (CurrentUser.Identity.IsAuthenticated)
{
IsAdmin = UtilitySecurity.IsAdministrator(CurrentUser.Identity.Name ?? "", strDefaultConnection);
}
}
catch
{
IsSuperAdmin = false;
IsAdmin = false;
}
}

Expand Down
2 changes: 1 addition & 1 deletion ADefHelpDeskWebApp/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"DefaultConnection": "data source=localhost;initial catalog=ADefHelpdeskBlazor;integrated security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"
"DefaultConnection": "data source=localhost;initial catalog=ADefHelpdesk1;integrated security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"
},
"Logging": {
"LogLevel": {
Expand Down

0 comments on commit 5c5c1de

Please sign in to comment.