diff --git a/src/OrchardCore.Modules/OrchardCore.DataProtection.Azure/BlobModularTenantEvents.cs b/src/OrchardCore.Modules/OrchardCore.DataProtection.Azure/BlobModularTenantEvents.cs
index 5803cf30503..582a29fe2e7 100644
--- a/src/OrchardCore.Modules/OrchardCore.DataProtection.Azure/BlobModularTenantEvents.cs
+++ b/src/OrchardCore.Modules/OrchardCore.DataProtection.Azure/BlobModularTenantEvents.cs
@@ -8,10 +8,10 @@ namespace OrchardCore.DataProtection.Azure;
///
/// A tenant event that deletes data protection blobs from a container when a tenant is deleted.
///
-public class BlobModularTenantEvents : ModularTenantEvents
+internal sealed class BlobModularTenantEvents : ModularTenantEvents
{
private readonly BlobOptions _blobOptions;
- private readonly ILogger _logger;
+ private readonly ILogger _logger;
public BlobModularTenantEvents(
BlobOptions blobOptions,
@@ -25,7 +25,7 @@ public BlobModularTenantEvents(
/// Removes the data protection blob from the container when a tenant is deleted.
///
/// The
- public async override Task RemovingAsync(ShellRemovingContext context)
+ public override Task RemovingAsync(ShellRemovingContext context)
{
var blobClient = new BlobClient(
_blobOptions.ConnectionString,
@@ -34,6 +34,6 @@ public async override Task RemovingAsync(ShellRemovingContext context)
_logger.LogDebug("Deleting blob '{BlobName}' from container '{ContainerName}'.", _blobOptions.BlobName, _blobOptions.ContainerName);
- await blobClient.DeleteIfExistsAsync();
+ return blobClient.DeleteIfExistsAsync();
}
}
diff --git a/src/OrchardCore.Modules/OrchardCore.Users/Liquid/UserFilters.cs b/src/OrchardCore.Modules/OrchardCore.Users/Liquid/UserFilters.cs
index 1e1d36564e9..b8ce03755cd 100644
--- a/src/OrchardCore.Modules/OrchardCore.Users/Liquid/UserFilters.cs
+++ b/src/OrchardCore.Modules/OrchardCore.Users/Liquid/UserFilters.cs
@@ -3,6 +3,7 @@
using Fluid.Values;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
using OrchardCore.Liquid;
using OrchardCore.Security;
using OrchardCore.Security.Permissions;
@@ -46,6 +47,10 @@ public static ValueTask HasClaim(FluidValue input, FilterArguments a
if (string.Equals(claimType, Permission.ClaimType, StringComparison.OrdinalIgnoreCase) &&
user.HasClaim(StandardClaims.SiteOwner.Type, StandardClaims.SiteOwner.Value))
{
+ var logger = context.Services.GetRequiredService>();
+
+ logger.LogWarning("The tenant is using the 'has_claim' Liquid filter for Permission claims '{ClaimName}', which will break in the next major release of OrchardCore; please use 'has_permission: \"{ClaimName}\"' instead.", claimName, claimName);
+
return BooleanValue.True;
}
}
diff --git a/src/OrchardCore/OrchardCore.Shells.Azure/Services/BlobShellsFileStore.cs b/src/OrchardCore/OrchardCore.Shells.Azure/Services/BlobShellsFileStore.cs
index 75befa7014c..caf56fb551e 100644
--- a/src/OrchardCore/OrchardCore.Shells.Azure/Services/BlobShellsFileStore.cs
+++ b/src/OrchardCore/OrchardCore.Shells.Azure/Services/BlobShellsFileStore.cs
@@ -12,19 +12,14 @@ public BlobShellsFileStore(IFileStore fileStore)
}
public Task CreateFileFromStreamAsync(string path, Stream inputStream)
- {
- return _fileStore.CreateFileFromStreamAsync(path, inputStream, true);
- }
+ => _fileStore.CreateFileFromStreamAsync(path, inputStream, true);
public Task GetFileInfoAsync(string path)
- {
- return _fileStore.GetFileInfoAsync(path);
- }
+ => _fileStore.GetFileInfoAsync(path);
public Task GetFileStreamAsync(string path)
- {
- return _fileStore.GetFileStreamAsync(path);
- }
+ => _fileStore.GetFileStreamAsync(path);
- public Task RemoveFileAsync(string path) => _fileStore.TryDeleteFileAsync(path);
+ public Task RemoveFileAsync(string path)
+ => _fileStore.TryDeleteFileAsync(path);
}