* Only use datetimeoffset in API * Updated publish endpoint to take schedule information * Fixed test builds * OpenApi updates * Update OpenApi schema * Fixed issues with publishing. * Added validation before publishing. Had to move a lot of classes to core. * added missing files * Added validation info to error * Typo * Clean up and adding missing result * Updating to AvailableCultures instead of PublishedCultures * Handle time needs to be in the future * validate only cultures that needs to be published * Fix typos * Filter out cultures that we are not trying to publish from the validation errors * Don't filter out only the available cultures, to accommodate non-created variants * Only allow publish of existing cultures * Fixed issues found in test * fixed build --------- Co-authored-by: Elitsa <elm@umbraco.dk>
19 lines
622 B
C#
19 lines
622 B
C#
using Umbraco.Cms.Core.Models.ContentEditing;
|
|
|
|
namespace Umbraco.Cms.Api.Management.Extensions;
|
|
|
|
internal static class ContentEditingExtensions
|
|
{
|
|
public static bool DoesNotVaryByCulture(this IHasCultureAndSegment model)
|
|
=> model.VariesByCulture() == false;
|
|
|
|
public static bool DoesNotVaryBySegment(this IHasCultureAndSegment model)
|
|
=> model.VariesBySegment() == false;
|
|
|
|
public static bool VariesByCulture(this IHasCultureAndSegment model)
|
|
=> model.Culture is not null;
|
|
|
|
public static bool VariesBySegment(this IHasCultureAndSegment model)
|
|
=> model.Segment is not null;
|
|
}
|