start work on controllers

This commit is contained in:
Nikolaj Geisle
2022-03-31 15:57:23 +02:00
parent 0993f7b073
commit 0fc310cc4e
26 changed files with 210 additions and 177 deletions

View File

@@ -41,11 +41,11 @@ namespace Umbraco.Cms.Web.BackOffice.Controllers
}
[UpdateCheckResponseFilter]
public async Task<UpgradeCheckResponse> GetCheck()
public async Task<UpgradeCheckResponse?> GetCheck()
{
var updChkCookie = _cookieManager.GetCookieValue("UMB_UPDCHK");
var updateCheckCookie = updChkCookie ?? string.Empty;
if (_globalSettings.VersionCheckPeriod > 0 && string.IsNullOrEmpty(updateCheckCookie) && _backofficeSecurityAccessor.BackOfficeSecurity.CurrentUser.IsAdmin())
if (_globalSettings.VersionCheckPeriod > 0 && string.IsNullOrEmpty(updateCheckCookie) && (_backofficeSecurityAccessor.BackOfficeSecurity?.CurrentUser?.IsAdmin() ?? false))
{
try
{