Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to queue releasing shell context from setting display drivers #15875

Merged
merged 26 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d2d2668
Add a way to queue releasing shell cotext from dite drivers
MikeAlhayek Apr 25, 2024
49b1ad4
cleanup
MikeAlhayek Apr 25, 2024
11f7cf2
Merge branch 'main' into ma/queue-release-settings
MikeAlhayek Apr 25, 2024
6a99ac9
remove a change
MikeAlhayek Apr 25, 2024
57eb99c
Merge branch 'ma/queue-release-settings' of https://github.com/Orchar…
MikeAlhayek Apr 25, 2024
42250f3
made ShellSettingsReleaseRequest more global
MikeAlhayek Apr 26, 2024
3b155b3
undo some changes
MikeAlhayek Apr 26, 2024
6c3b896
Update src/docs/releases/1.9.0.md
MikeAlhayek Apr 26, 2024
f4fe7ee
update docs
MikeAlhayek Apr 26, 2024
5d77f76
fix conflict
MikeAlhayek Apr 26, 2024
1c947ac
cleanup
MikeAlhayek Apr 26, 2024
c3b5e5e
use IShellContextReleaseService instead of HttpContext
MikeAlhayek Apr 28, 2024
43a7049
Fix service registration
MikeAlhayek Apr 28, 2024
75fcd45
Update src/docs/releases/1.9.0.md
MikeAlhayek Apr 28, 2024
ad8c41b
Merge branch 'main' into ma/queue-release-settings
MikeAlhayek Apr 29, 2024
6ed9918
cleanup
MikeAlhayek Apr 29, 2024
a183650
Merge branch 'main' into ma/queue-release-settings
MikeAlhayek Apr 29, 2024
78b0a0f
Update src/OrchardCore/OrchardCore/Shell/ShellContextReleaseService.cs
MikeAlhayek Apr 29, 2024
32ed4d9
Update src/OrchardCore/OrchardCore/ShellSettingsReleaseFilter.cs
MikeAlhayek Apr 29, 2024
31a509d
Drop the filter and rename IDeferredShellContextReleaseService
MikeAlhayek Apr 29, 2024
c61ea3d
update docs
MikeAlhayek Apr 29, 2024
19fca82
Merge branch 'main' into ma/queue-release-settings
MikeAlhayek Apr 29, 2024
fed8a44
call AddDeferredTask from the service
MikeAlhayek Apr 30, 2024
8790360
update docs
MikeAlhayek Apr 30, 2024
04087a0
Rename IDeferredShellContextReleaseService to IShellReleaseManager
MikeAlhayek Apr 30, 2024
a2b75a5
Merge branch 'main' into ma/queue-release-settings
MikeAlhayek Apr 30, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace OrchardCore.Azure.Email.Drivers;

public class AzureEmailSettingsDisplayDriver : SectionDisplayDriver<ISite, AzureEmailSettings>
{
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;
private readonly IDataProtectionProvider _dataProtectionProvider;
Expand All @@ -33,7 +33,7 @@ public class AzureEmailSettingsDisplayDriver : SectionDisplayDriver<ISite, Azure
protected IStringLocalizer S;

public AzureEmailSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IHttpContextAccessor httpContextAccessor,
IAuthorizationService authorizationService,
IDataProtectionProvider dataProtectionProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class SmtpSettingsDisplayDriver : SectionDisplayDriver<ISite, SmtpSetting
[Obsolete("This property should no longer be used. Instead use EmailSettings.GroupId")]
public const string GroupId = EmailSettings.GroupId;

private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly SmtpOptions _smtpOptions;
Expand All @@ -35,7 +35,7 @@ public class SmtpSettingsDisplayDriver : SectionDisplayDriver<ISite, SmtpSetting
protected readonly IStringLocalizer S;

public SmtpSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IDataProtectionProvider dataProtectionProvider,
IHttpContextAccessor httpContextAccessor,
IOptions<SmtpOptions> options,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class EmailSettingsDisplayDriver : SectionDisplayDriver<ISite, EmailSetti
private readonly IAuthorizationService _authorizationService;
private readonly EmailOptions _emailOptions;
private readonly IEmailProviderResolver _emailProviderResolver;
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly EmailProviderOptions _emailProviders;

protected readonly IStringLocalizer S;
Expand All @@ -35,7 +35,7 @@ public class EmailSettingsDisplayDriver : SectionDisplayDriver<ISite, EmailSetti
IOptions<EmailProviderOptions> emailProviders,
IOptions<EmailOptions> emailOptions,
IEmailProviderResolver emailProviderResolver,
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IStringLocalizer<EmailSettingsDisplayDriver> stringLocalizer)
{
_httpContextAccessor = httpContextAccessor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ namespace OrchardCore.Facebook.Drivers
{
public class FacebookSettingsDisplayDriver : SectionDisplayDriver<ISite, FacebookSettings>
{
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IAuthorizationService _authorizationService;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly ILogger _logger;

public FacebookSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IAuthorizationService authorizationService,
IDataProtectionProvider dataProtectionProvider,
IHttpContextAccessor httpContextAccessor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ namespace OrchardCore.Facebook.Login.Drivers
{
public class FacebookLoginSettingsDisplayDriver : SectionDisplayDriver<ISite, FacebookLoginSettings>
{
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IAuthorizationService _authorizationService;
private readonly IHttpContextAccessor _httpContextAccessor;

public FacebookLoginSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IAuthorizationService authorizationService,
IHttpContextAccessor httpContextAccessor)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ namespace OrchardCore.GitHub.Drivers
{
public class GitHubAuthenticationSettingsDisplayDriver : SectionDisplayDriver<ISite, GitHubAuthenticationSettings>
{
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IAuthorizationService _authorizationService;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly ILogger _logger;

public GitHubAuthenticationSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IAuthorizationService authorizationService,
IDataProtectionProvider dataProtectionProvider,
IHttpContextAccessor httpContextAccessor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ namespace OrchardCore.Google.Authentication.Drivers
{
public class GoogleAuthenticationSettingsDisplayDriver : SectionDisplayDriver<ISite, GoogleAuthenticationSettings>
{
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IAuthorizationService _authorizationService;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly ILogger _logger;

public GoogleAuthenticationSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IAuthorizationService authorizationService,
IDataProtectionProvider dataProtectionProvider,
IHttpContextAccessor httpContextAccessor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ public class HttpsSettingsDisplayDriver : SectionDisplayDriver<ISite, HttpsSetti
{
public const string GroupId = "Https";

private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;
private readonly INotifier _notifier;

protected readonly IHtmlLocalizer H;

public HttpsSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IHttpContextAccessor httpContextAccessor,
IAuthorizationService authorizationService,
INotifier notifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace OrchardCore.Localization.Drivers
public class LocalizationSettingsDisplayDriver : SectionDisplayDriver<ISite, LocalizationSettings>
{
public const string GroupId = "localization";
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly INotifier _notifier;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;
Expand All @@ -35,7 +35,7 @@ public class LocalizationSettingsDisplayDriver : SectionDisplayDriver<ISite, Loc
protected readonly IStringLocalizer S;

public LocalizationSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
INotifier notifier,
IHttpContextAccessor httpContextAccessor,
IAuthorizationService authorizationService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ namespace OrchardCore.Microsoft.Authentication.Drivers
{
public class AzureADSettingsDisplayDriver : SectionDisplayDriver<ISite, AzureADSettings>
{
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IAuthorizationService _authorizationService;
private readonly IHttpContextAccessor _httpContextAccessor;

public AzureADSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IAuthorizationService authorizationService,
IHttpContextAccessor httpContextAccessor)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ namespace OrchardCore.Microsoft.Authentication.Drivers
{
public class MicrosoftAccountSettingsDisplayDriver : SectionDisplayDriver<ISite, MicrosoftAccountSettings>
{
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IAuthorizationService _authorizationService;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly ILogger _logger;

public MicrosoftAccountSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IAuthorizationService authorizationService,
IDataProtectionProvider dataProtectionProvider,
IHttpContextAccessor httpContextAccessor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class OpenIdClientSettingsDisplayDriver : SectionDisplayDriver<ISite, Ope
private const string SettingsGroupId = "OrchardCore.OpenId.Client";
private static readonly char[] _separator = [' ', ','];

private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IAuthorizationService _authorizationService;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly IHttpContextAccessor _httpContextAccessor;
Expand All @@ -35,7 +35,7 @@ public class OpenIdClientSettingsDisplayDriver : SectionDisplayDriver<ISite, Ope
protected readonly IStringLocalizer S;

public OpenIdClientSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IAuthorizationService authorizationService,
IDataProtectionProvider dataProtectionProvider,
IOpenIdClientService clientService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ public class ReCaptchaSettingsDisplayDriver : SectionDisplayDriver<ISite, ReCapt
{
public const string GroupId = "recaptcha";

private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;

public ReCaptchaSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IHttpContextAccessor httpContextAccessor,
IAuthorizationService authorizationService)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ public class ReverseProxySettingsDisplayDriver : SectionDisplayDriver<ISite, Rev
{
public const string GroupId = "ReverseProxy";

private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;

public ReverseProxySettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IHttpContextAccessor httpContextAccessor,
IAuthorizationService authorizationService)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class AzureAISearchDefaultSettingsDisplayDriver : SectionDisplayDriver<IS
private readonly IAuthorizationService _authorizationService;
private readonly AzureAISearchDefaultOptions _searchOptions;
private readonly IDataProtectionProvider _dataProtectionProvider;
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;

protected readonly IStringLocalizer S;

Expand All @@ -36,7 +36,7 @@ public class AzureAISearchDefaultSettingsDisplayDriver : SectionDisplayDriver<IS
IAuthorizationService authorizationService,
IOptions<AzureAISearchDefaultOptions> searchOptions,
IDataProtectionProvider dataProtectionProvider,
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IStringLocalizer<AzureAISearchDefaultSettingsDisplayDriver> stringLocalizer
)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ public class AzureAISearchSettingsDisplayDriver : SectionDisplayDriver<ISite, Az
private readonly AzureAISearchIndexSettingsService _indexSettingsService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;

protected readonly IStringLocalizer S;

public AzureAISearchSettingsDisplayDriver(
AzureAISearchIndexSettingsService indexSettingsService,
IHttpContextAccessor httpContextAccessor,
IAuthorizationService authorizationService,
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IStringLocalizer<AzureAISearchSettingsDisplayDriver> stringLocalizer
)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ public class SecuritySettingsDisplayDriver : SectionDisplayDriver<ISite, Securit
{
internal const string SettingsGroupId = "SecurityHeaders";

private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;
private readonly SecuritySettings _securitySettings;

public SecuritySettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IHttpContextAccessor httpContextAccessor,
IAuthorizationService authorizationService,
IOptionsSnapshot<SecuritySettings> securitySettings)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace OrchardCore.Settings.Controllers
public class AdminController : Controller
{
private readonly IDisplayManager<ISite> _siteSettingsDisplayManager;
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly ISiteService _siteService;
private readonly INotifier _notifier;
private readonly IAuthorizationService _authorizationService;
Expand All @@ -27,7 +27,7 @@ public class AdminController : Controller
protected readonly IHtmlLocalizer H;

public AdminController(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
ISiteService siteService,
IDisplayManager<ISite> siteSettingsDisplayManager,
IAuthorizationService authorizationService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ public class DefaultSiteSettingsDisplayDriver : DisplayDriver<ISite>
{
public const string GroupId = "general";

private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IHttpContextAccessor _httpContextAccessor;

protected readonly IStringLocalizer S;

public DefaultSiteSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IHttpContextAccessor httpContextAccessor,
IStringLocalizer<DefaultSiteSettingsDisplayDriver> stringLocalizer)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace OrchardCore.Sms.Drivers;

public class SmsSettingsDisplayDriver : SectionDisplayDriver<ISite, SmsSettings>
{
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;

Expand All @@ -28,7 +28,7 @@ public class SmsSettingsDisplayDriver : SectionDisplayDriver<ISite, SmsSettings>
private readonly SmsProviderOptions _smsProviderOptions;

public SmsSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IHttpContextAccessor httpContextAccessor,
IAuthorizationService authorizationService,
IOptions<SmsProviderOptions> smsProviders,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace OrchardCore.Sms.Drivers;

public class TwilioSettingsDisplayDriver : SectionDisplayDriver<ISite, TwilioSettings>
{
private readonly IShellContextReleaseService _shellContextReleaseService;
private readonly IDeferredShellContextReleaseService _shellContextReleaseService;
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IAuthorizationService _authorizationService;
private readonly IPhoneFormatValidator _phoneFormatValidator;
Expand All @@ -34,7 +34,7 @@ public class TwilioSettingsDisplayDriver : SectionDisplayDriver<ISite, TwilioSet
protected readonly IStringLocalizer S;

public TwilioSettingsDisplayDriver(
IShellContextReleaseService shellContextReleaseService,
IDeferredShellContextReleaseService shellContextReleaseService,
IHttpContextAccessor httpContextAccessor,
IAuthorizationService authorizationService,
IPhoneFormatValidator phoneFormatValidator,
Expand Down