Skip to content

Commit

Permalink
Only display new version banner for server admins.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Mar 19, 2021
1 parent a4e083d commit 91a3ebf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Server/Pages/Index.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@ public async Task<IActionResult> OnGet()
RegistrationAvailable = _appConfig.MaxOrganizationCount < 0 || organizationCount < _appConfig.MaxOrganizationCount;

var org = _dataService.GetOrganizationById(user.OrganizationID);
IsNewVersionAvailable = await _upgradeService.IsNewVersionAvailable();

if (user.IsServerAdmin)
{
IsNewVersionAvailable = await _upgradeService.IsNewVersionAvailable();
}

DefaultPrompt = _dataService.GetDefaultPrompt(User.Identity.Name);
var groups = _dataService.GetDeviceGroups(User.Identity.Name);
Expand Down

0 comments on commit 91a3ebf

Please sign in to comment.