Skip to content

Commit

Permalink
Merge branch 'main' into ma/roles-abstractions
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Nov 28, 2024
2 parents 7fde8d1 + d016259 commit 62cbd1f
Show file tree
Hide file tree
Showing 21 changed files with 40 additions and 38 deletions.
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ dotnet_diagnostic.IDE0130.severity = silent # Na
dotnet_style_prefer_conditional_expression_over_assignment = silent # Remove redundant equality, e.g. Disabled == false

dotnet_diagnostic.CA2263.severity = warning # Prefer generic overload when type is known
dotnet_diagnostic.CA1816.severity = none # Dispose methods should call SuppressFinalize

# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Nightly (`main`):
[![Build status](https://github.com/OrchardCMS/OrchardCore/actions/workflows/preview_ci.yml/badge.svg)](https://github.com/OrchardCMS/OrchardCore/actions?query=workflow%3A%22Preview+-+CI%22)
[![Cloudsmith](https://api-prd.cloudsmith.io/badges/version/orchardcore/preview/nuget/OrchardCore.Application.Cms.Targets/latest/x/?render=true&badge_token=gAAAAABey9hKFD_C-ZIpLvayS3HDsIjIorQluDs53KjIdlxoDz6Ntt1TzvMNJp7a_UWvQbsfN5nS7_0IbxCyqHZsjhmZP6cBkKforo-NqwrH5-E6QCrJ3D8%3D)](https://cloudsmith.io/~orchardcore/repos/preview/packages/detail/nuget/OrchardCore.Application.Cms.Targets/latest/)

## Project Status: v2.1.1
## Project Status: v2.1.2

The software is production-ready, and capable of serving large mission-critical applications as well, and we're not aware of any fundamental bugs or missing features we deem crucial. Orchard Core continues to evolve, with each version bringing new improvements, and keeping up with the cutting-edge of .NET.

Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ nav:
- Owners: resources/owners/README.md
- Workshops: resources/workshops/README.md
- Releases:
- 2.1.2: releases/2.1.2.md
- 2.1.1: releases/2.1.1.md
- 2.1.0: releases/2.1.0.md
- 2.0.2: releases/2.0.2.md
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Html/Migrations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public async Task<int> UpdateFrom3Async()
lastDocumentId = contentItemVersion.Id;
}

await _session.SaveChangesAsync();
await _session.FlushAsync();
}

static bool UpdateBody(JsonNode content)
Expand Down
2 changes: 1 addition & 1 deletion src/OrchardCore.Modules/OrchardCore.Title/Migrations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public async Task<int> UpdateFrom1()
lastDocumentId = contentItemVersion.Id;
}

await _session.SaveChangesAsync();
await _session.FlushAsync();
}

static bool UpdateTitle(JsonNode content)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public virtual async ValueTask CreateAsync(TApplication application, Cancellatio
cancellationToken.ThrowIfCancellationRequested();

await _session.SaveAsync(application, collection: OpenIdCollection);
await _session.SaveChangesAsync();
await _session.FlushAsync();
}

/// <inheritdoc/>
Expand All @@ -61,7 +61,7 @@ public virtual async ValueTask DeleteAsync(TApplication application, Cancellatio
cancellationToken.ThrowIfCancellationRequested();

_session.Delete(application, collection: OpenIdCollection);
await _session.SaveChangesAsync();
await _session.FlushAsync();
}

/// <inheritdoc/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public virtual async ValueTask CreateAsync(TAuthorization authorization, Cancell
cancellationToken.ThrowIfCancellationRequested();

await _session.SaveAsync(authorization, collection: OpenIdCollection);
await _session.SaveChangesAsync();
await _session.FlushAsync();
}

/// <inheritdoc/>
Expand All @@ -55,7 +55,7 @@ public virtual async ValueTask DeleteAsync(TAuthorization authorization, Cancell
cancellationToken.ThrowIfCancellationRequested();

_session.Delete(authorization, collection: OpenIdCollection);
await _session.SaveChangesAsync();
await _session.FlushAsync();
}

/// <inheritdoc/>
Expand Down Expand Up @@ -319,7 +319,7 @@ public virtual async ValueTask<long> PruneAsync(DateTimeOffset threshold, Cancel

try
{
await _session.SaveChangesAsync();
await _session.FlushAsync();
}
catch (Exception exception)
{
Expand Down Expand Up @@ -440,7 +440,7 @@ public virtual async ValueTask UpdateAsync(TAuthorization authorization, Cancell

try
{
await _session.SaveChangesAsync();
await _session.FlushAsync();
}
catch (ConcurrencyException exception)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public virtual async ValueTask CreateAsync(TScope scope, CancellationToken cance
cancellationToken.ThrowIfCancellationRequested();

await _session.SaveAsync(scope, collection: OpenIdCollection);
await _session.SaveChangesAsync();
await _session.FlushAsync();
}

/// <inheritdoc/>
Expand All @@ -54,7 +54,7 @@ public virtual async ValueTask DeleteAsync(TScope scope, CancellationToken cance
cancellationToken.ThrowIfCancellationRequested();

_session.Delete(scope, collection: OpenIdCollection);
await _session.SaveChangesAsync();
await _session.FlushAsync();
}

/// <inheritdoc/>
Expand Down Expand Up @@ -326,7 +326,7 @@ public virtual async ValueTask UpdateAsync(TScope scope, CancellationToken cance

try
{
await _session.SaveChangesAsync();
await _session.FlushAsync();
}
catch (ConcurrencyException exception)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public virtual async ValueTask CreateAsync(TToken token, CancellationToken cance
cancellationToken.ThrowIfCancellationRequested();

await _session.SaveAsync(token, collection: OpenIdCollection);
await _session.SaveChangesAsync();
await _session.FlushAsync();
}

/// <inheritdoc/>
Expand All @@ -55,7 +55,7 @@ public virtual async ValueTask DeleteAsync(TToken token, CancellationToken cance
cancellationToken.ThrowIfCancellationRequested();

_session.Delete(token, collection: OpenIdCollection);
await _session.SaveChangesAsync();
await _session.FlushAsync();
}

/// <inheritdoc/>
Expand Down Expand Up @@ -354,7 +354,7 @@ public virtual async ValueTask<long> PruneAsync(DateTimeOffset threshold, Cancel

try
{
await _session.SaveChangesAsync();
await _session.FlushAsync();
}
catch (Exception exception)
{
Expand Down Expand Up @@ -399,7 +399,7 @@ public virtual async ValueTask<long> RevokeByAuthorizationIdAsync(string identif
await _session.SaveAsync(token, checkConcurrency: false, collection: OpenIdCollection);
}

await _session.SaveChangesAsync();
await _session.FlushAsync();

return tokens.Count;
}
Expand Down Expand Up @@ -546,7 +546,7 @@ public virtual async ValueTask UpdateAsync(TToken token, CancellationToken cance

try
{
await _session.SaveChangesAsync();
await _session.FlushAsync();
}
catch (ConcurrencyException exception)
{
Expand Down
7 changes: 3 additions & 4 deletions src/OrchardCore/OrchardCore.Users.Core/Services/UserStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public UserStore(ISession session,

public void Dispose()
{
GC.SuppressFinalize(this);
}

public string NormalizeKey(string key)
Expand Down Expand Up @@ -111,7 +110,7 @@ public async Task<IdentityResult> CreateAsync(IUser user, CancellationToken canc
}

await _session.SaveAsync(user);
await _session.SaveChangesAsync();
await _session.FlushAsync();
await Handlers.InvokeAsync((handler, context) => handler.CreatedAsync(context), context, _logger);
}
catch (Exception e)
Expand Down Expand Up @@ -139,7 +138,7 @@ public async Task<IdentityResult> DeleteAsync(IUser user, CancellationToken canc
}

_session.Delete(user);
await _session.SaveChangesAsync();
await _session.FlushAsync();
await Handlers.InvokeAsync((handler, context) => handler.DeletedAsync(context), context, _logger);
}
catch (Exception e)
Expand Down Expand Up @@ -232,7 +231,7 @@ public async Task<IdentityResult> UpdateAsync(IUser user, CancellationToken canc
}

await _session.SaveAsync(user);
await _session.SaveChangesAsync();
await _session.FlushAsync();
await Handlers.InvokeAsync((handler, context) => handler.UpdatedAsync(context), context, _logger);
}
catch (Exception e)
Expand Down
2 changes: 1 addition & 1 deletion src/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Orchard Core CMS supports all major site building strategies:

## Status

The latest released version of Orchard Core is `2.1.1`. The release notes can be found under [Releases](releases/2.1.1.md).
The latest released version of Orchard Core is `2.1.2`. The release notes can be found under [Releases](releases/2.1.2.md).

## Getting Started

Expand Down
8 changes: 4 additions & 4 deletions src/docs/getting-started/templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ More information about `dotnet new` can be found at <https://docs.microsoft.com/
Once the .NET Core SDK has been installed, type the following command to install the templates for creating Orchard Core web applications:

```CMD
dotnet new install OrchardCore.ProjectTemplates::2.1.1
dotnet new install OrchardCore.ProjectTemplates::2.1.2
```

This will use the most stable release of Orchard Core. In order to use the latest `main` branch of Orchard Core, the following command can be used:

```CMD
dotnet new install OrchardCore.ProjectTemplates::2.1.1-* --nuget-source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json
dotnet new install OrchardCore.ProjectTemplates::2.1.2-* --nuget-source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json
```

## Create a new website
Expand Down Expand Up @@ -44,7 +44,7 @@ Options:
-ov|--orchard-version Specifies which version of Orchard Core packages to use.
string - Optional
Default: 2.1.1
Default: 2.1.2
```

Logging can be ignored with this command:
Expand Down Expand Up @@ -133,7 +133,7 @@ Options:
-ov|--orchard-version Specifies which version of Orchard Core packages to use.
string - Optional
Default: 2.1.1
Default: 2.1.2
```

```CMD
Expand Down
6 changes: 3 additions & 3 deletions src/docs/guides/add-admin-menu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ There are different ways to create sites and modules for Orchard Core. You can l

You can install the latest released templates using this command:

```dotnet new install OrchardCore.ProjectTemplates::2.1.1-*```
```dotnet new install OrchardCore.ProjectTemplates::2.1.2-*```

!!! note
To use the development branch of the template add `--nuget-source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json`
Expand All @@ -40,10 +40,10 @@ The next step is to reference the module from the application, by adding a proje

We also need a reference to the `OrchardCore.Admin` package in order to be able to implement the required interfaces:

```dotnet add .\MyModule\MyModule.csproj package OrchardCore.Admin --version 2.1.1-*```
```dotnet add .\MyModule\MyModule.csproj package OrchardCore.Admin --version 2.1.2-*```

!!! note
To use the development branch of the template add ` --source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json --version 2.1.1-*`
To use the development branch of the template add ` --source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json --version 2.1.2-*`

## Adding our controller and views

Expand Down
2 changes: 1 addition & 1 deletion src/docs/guides/create-blazor-cms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ In our `OCBlazorLib` blazor Library project, Let's enrich our `/content` page to
- In `OCBlazorLib.csproj` Add a NuGet package reference to `OrchardCore.ContentManagement`

```dotnetcli
dotnet add ./OCBlazorLib/OCBlazorLib.csproj package OrchardCore.ContentManagement --version 2.1.1
dotnet add ./OCBlazorLib/OCBlazorLib.csproj package OrchardCore.ContentManagement --version 2.1.2
```

- Add the following `using` statements in `_Imports.razor`
Expand Down
2 changes: 1 addition & 1 deletion src/docs/guides/create-cms-application/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ There are different ways to create sites and modules for Orchard Core. You can l

In this guide we will use our "Code Generation Templates". You can install the latest stable release of the templates using this command:

```dotnet new install OrchardCore.ProjectTemplates::2.1.1-*```
```dotnet new install OrchardCore.ProjectTemplates::2.1.2-*```

!!! note
To use the development branch of the template add `--nuget-source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json`.
Expand Down
2 changes: 1 addition & 1 deletion src/docs/guides/create-modular-application-mvc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ There are different ways to create sites and modules for Orchard Core. You can l

In this guide we will use our [Code Generation Templates](../../getting-started/templates/README.md). You can install the latest stable release of the templates using this command:

```dotnet new install OrchardCore.ProjectTemplates::2.1.1-*```
```dotnet new install OrchardCore.ProjectTemplates::2.1.2-*```

!!! note
To use the development branch of the template add `--nuget-source https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json`
Expand Down
2 changes: 1 addition & 1 deletion src/docs/guides/decoupled-cms/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This will allow for the Razor Pages to be reloaded without the need to recompile

```xml
<ItemGroup>
<PackageReference Include="OrchardCore.Application.Cms.Core.Targets" Version="2.1.1" />
<PackageReference Include="OrchardCore.Application.Cms.Core.Targets" Version="2.1.2" />
</ItemGroup>
```

Expand Down
2 changes: 1 addition & 1 deletion src/docs/releases/2.1.1.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Orchard Core 2.1.1

Release date: November 15, 2024
Release date: November 25, 2024

This release includes critical bug fixes related to security vulnerabilities.
5 changes: 5 additions & 0 deletions src/docs/releases/2.1.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Orchard Core 2.1.2

Release date: November 27, 2024

This release includes critical bug fixes related to stability.
Original file line number Diff line number Diff line change
Expand Up @@ -648,9 +648,7 @@ public void Build()
_inner = _services.BuildServiceProvider();
}

#pragma warning disable CA1816 // Dispose methods should call SuppressFinalize
public void Dispose()
#pragma warning restore CA1816 // Dispose methods should call SuppressFinalize
{
(_inner as IDisposable)?.Dispose();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -495,9 +495,7 @@ public async Task DerivedThemesCanOverrideBaseThemeShapeBindings()
Assert.Equal("DerivedTheme", table.Descriptors["OverriddenShape"].BindingSource);
}

#pragma warning disable CA1816 // Dispose methods should call SuppressFinalize
public void Dispose()
#pragma warning restore CA1816 // Dispose methods should call SuppressFinalize
{
(_serviceProvider as IDisposable)?.Dispose();
}
Expand Down

0 comments on commit 62cbd1f

Please sign in to comment.