U4-9201 - fix it all
This commit is contained in:
@@ -78,7 +78,7 @@ namespace Umbraco.Web.Scheduling
|
||||
}
|
||||
|
||||
// running on a background task, requires a safe database (see UsingSafeDatabase doc)
|
||||
using (ApplicationContext.Current.DatabaseContext.UsingSafeDatabase)
|
||||
using (ApplicationContext.Current.DatabaseContext.UseSafeDatabase(true))
|
||||
using (DisposableTimer.DebugDuration<LogScrubber>("Log scrubbing executing", "Log scrubbing complete"))
|
||||
{
|
||||
Log.CleanLogs(GetLogScrubbingMaximumAge(_settings));
|
||||
|
||||
@@ -83,10 +83,8 @@ namespace Umbraco.Web.Scheduling
|
||||
};
|
||||
|
||||
// running on a background task, requires a safe database (see UsingSafeDatabase doc)
|
||||
//
|
||||
// this is because GetAuthenticationHeaderValue uses UserService to load the current user, hence requires a database
|
||||
//
|
||||
using (ApplicationContext.Current.DatabaseContext.UsingSafeDatabase)
|
||||
// (GetAuthenticationHeaderValue uses UserService to load the current user, hence requires a database)
|
||||
using (ApplicationContext.Current.DatabaseContext.UseSafeDatabase(true))
|
||||
{
|
||||
//pass custom the authorization header
|
||||
request.Headers.Authorization = AdminTokenAuthorizeAttribute.GetAuthenticationHeaderValue(_appContext);
|
||||
|
||||
Reference in New Issue
Block a user