Skip to content

Commit

Permalink
Obsolete GroupId.
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahelsaig committed Aug 8, 2024
1 parent a34f79c commit 34540fe
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using OrchardCore.DisplayManagement.Views;
using OrchardCore.Security.Permissions;
using OrchardCore.Settings;
using System;
using System.Text.Json;
using System.Threading.Tasks;

Expand All @@ -14,7 +15,9 @@ namespace Lombiq.HelpfulLibraries.OrchardCore.Contents;
public abstract class JsonSectionDisplayDriver<TSection, TAdditionalData> : SiteDisplayDriver<TSection>
where TSection : class, new()
{
protected abstract string GroupId { get; }
[Obsolete($"Override {nameof(SettingsGroupId)} instead. This property will be removed in future versions.")]
protected virtual string GroupId => SettingsGroupId;

protected virtual Permission Permission => null;
protected virtual string ShapeType => $"{typeof(TSection).Name}_Edit";
protected virtual string Location => $"{CommonLocationNames.Content}:1";
Expand All @@ -40,7 +43,7 @@ await AuthorizeAsync()
settings.AdditionalData = await GetAdditionalDataAsync(section, context);
})
.Location(Location)
.OnGroup(GroupId)
.OnGroup(SettingsGroupId)
: null;

public override async Task<IDisplayResult> UpdateAsync(ISite model, TSection section, UpdateEditorContext context)
Expand Down

0 comments on commit 34540fe

Please sign in to comment.