Skip to content

Commit

Permalink
Merge pull request #170 from Lombiq/issue/OCC-245
Browse files Browse the repository at this point in the history
OCC-245: Update OC preview version
  • Loading branch information
Piedone authored Jul 28, 2024
2 parents ab7a875 + 60efcf6 commit 16eb73c
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' == 'true'">
<PackageReference Include="Lombiq.Tests.UI" Version="10.0.1" />
<PackageReference Include="Lombiq.Tests.UI" Version="10.0.2-alpha.1.occ-245" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using OrchardCore.ContentManagement.Metadata.Models;
using OrchardCore.ContentManagement.Metadata.Settings;
using OrchardCore.ContentTypes.Editors;
using OrchardCore.DisplayManagement.Handlers;
using OrchardCore.DisplayManagement.Views;
using System.Threading.Tasks;

Expand All @@ -20,15 +21,12 @@ public override IDisplayResult Edit(ContentTypeDefinition model) =>

public override async Task<IDisplayResult> UpdateAsync(ContentTypeDefinition model, UpdateTypeEditorContext context)
{
var viewModel = new StrictSecuritySettingsViewModel();
var viewModel = await context.CreateModelMaybeAsync<StrictSecuritySettingsViewModel>(Prefix);

if (await context.Updater.TryUpdateModelAsync(viewModel, Prefix))
{
// Securable must be enabled for Strict Securable to make sense. Also checked on the client side too.
if (model.GetSettings<ContentTypeSettings>()?.Securable != true) viewModel.Enabled = false;
// Securable must be enabled for Strict Securable to make sense. Also checked on the client side too.
if (model.GetSettings<ContentTypeSettings>()?.Securable != true) viewModel.Enabled = false;

context.Builder.MergeSettings<StrictSecuritySettings>(settings => settings.Enabled = viewModel.Enabled);
}
context.Builder.MergeSettings<StrictSecuritySettings>(settings => settings.Enabled = viewModel.Enabled);

return Edit(model);
}
Expand Down
26 changes: 13 additions & 13 deletions Lombiq.HelpfulExtensions/Lombiq.HelpfulExtensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="OrchardCore.Autoroute" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.ContentFields" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Contents" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Flows" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Html" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Lists" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Liquid.Abstractions" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Markdown" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.MetaWeblog.Abstractions" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Module.Targets" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Rules.Abstractions" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Workflows" Version="2.0.0-preview-18200" />
<PackageReference Include="OrchardCore.Autoroute" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.ContentFields" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.Contents" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.Flows" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.Html" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.Lists" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.Liquid.Abstractions" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.Markdown" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.MetaWeblog.Abstractions" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.Module.Targets" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.Rules.Abstractions" Version="2.0.0-preview-18282" />
<PackageReference Include="OrchardCore.Workflows" Version="2.0.0-preview-18282" />
<PackageReference Include="Scrutor" Version="4.2.2" />
</ItemGroup>

Expand All @@ -56,7 +56,7 @@
</ItemGroup>

<ItemGroup Condition="'$(NuGetBuild)' == 'true'">
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="10.0.0" />
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="10.0.1-alpha.2.occ-245" />
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="2.1.0" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions Lombiq.HelpfulExtensions/Manifest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
Dependencies =
[
"OrchardCore.Email",
"OrchardCore.Email.Smtp",
]
)]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
<li>
@if (!string.IsNullOrEmpty(link.ContentItemId))
{
var url = Orchard.Action<AdminController>(controller => controller.Edit(
link.ContentItemId));
var url = Orchard.Action<AdminController>(controller => controller.Edit(link.ContentItemId, null));
<a class="dropdown-item btn-sm" href="@url" title="@T["Edit {0}", link.DisplayText]">
<i class="fa-solid fa-edit" aria-hidden="true"></i> @link.DisplayText
</a>
Expand Down
10 changes: 10 additions & 0 deletions NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!-- Ignore global configuration -->
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="OrchardCorePreview" value="https://nuget.cloudsmith.io/orchardcore/preview/v3/index.json" />
<add key="Lombiq" value="https://nuget.cloudsmith.io/lombiq/open-source-orchard-core-extensions/v3/index.json" />
</packageSources>
</configuration>

0 comments on commit 16eb73c

Please sign in to comment.