AuditNotificationsHandler updated to use IOptionsMonitor
This commit is contained in:
@@ -30,7 +30,7 @@ namespace Umbraco.Cms.Core.Handlers
|
||||
private readonly IEntityService _entityService;
|
||||
private readonly IIpResolver _ipResolver;
|
||||
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor;
|
||||
private readonly GlobalSettings _globalSettings;
|
||||
private GlobalSettings _globalSettings;
|
||||
private readonly IMemberService _memberService;
|
||||
|
||||
public AuditNotificationsHandler(
|
||||
@@ -38,7 +38,7 @@ namespace Umbraco.Cms.Core.Handlers
|
||||
IUserService userService,
|
||||
IEntityService entityService,
|
||||
IIpResolver ipResolver,
|
||||
IOptions<GlobalSettings> globalSettings,
|
||||
IOptionsMonitor<GlobalSettings> globalSettings,
|
||||
IBackOfficeSecurityAccessor backOfficeSecurityAccessor,
|
||||
IMemberService memberService)
|
||||
{
|
||||
@@ -48,7 +48,8 @@ namespace Umbraco.Cms.Core.Handlers
|
||||
_ipResolver = ipResolver;
|
||||
_backOfficeSecurityAccessor = backOfficeSecurityAccessor;
|
||||
_memberService = memberService;
|
||||
_globalSettings = globalSettings.Value;
|
||||
_globalSettings = globalSettings.CurrentValue;
|
||||
globalSettings.OnChange(x => _globalSettings = x);
|
||||
}
|
||||
|
||||
private IUser CurrentPerformingUser
|
||||
|
||||
Reference in New Issue
Block a user