Bugfixes..

- ModelsBuilder: Inject PublishedValueFallback into static Mixins
- ModelsBuilder: Throw exception if compiler can't compile the code
- CheckIfUserTicketDataIsStaleAttribute: Scope issue
- Ambiguous Actions: Couldn't determine the action when empty arrays was passed. Fixed by using more v8 like solution. (Still stupid the client not just have different endpoints)
- Fixed issue with reading the body from post requests. Often we where not allowed to seek in the stream.
- UmbracoHelper: Made available on UmbracoViewPage
- Client entity.resource.js: Don't ask server when getByIds has 0 ids.
- Client content.resource.js: Renamed endpoint GetEmptyBlueprint to avoid ambiguous action name
This commit is contained in:
Bjarke Berg
2021-01-29 10:30:28 +01:00
parent 04058fb9c6
commit 14284b64c2
27 changed files with 454 additions and 303 deletions

View File

@@ -1,24 +1,23 @@
using Umbraco.Core.Services;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net.Http;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Umbraco.Core.Hosting;
using Umbraco.Core.Models;
using Umbraco.Core.Strings;
using Umbraco.Web.Models.ContentEditing;
using Constants = Umbraco.Core.Constants;
using Umbraco.Core.PropertyEditors;
using Umbraco.Web.Common.Attributes;
using Umbraco.Core;
using Umbraco.Core.Hosting;
using Umbraco.Core.Mapping;
using Umbraco.Core.Models;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.Security;
using Microsoft.AspNetCore.Authorization;
using Umbraco.Core.Services;
using Umbraco.Core.Strings;
using Umbraco.Web.Common.ActionsResults;
using Umbraco.Web.Common.Attributes;
using Umbraco.Web.Common.Authorization;
using Umbraco.Web.Models.ContentEditing;
namespace Umbraco.Web.BackOffice.Controllers
{
@@ -28,6 +27,7 @@ namespace Umbraco.Web.BackOffice.Controllers
/// </summary>
[PluginController(Constants.Web.Mvc.BackOfficeApiArea)]
[Authorize(Policy = AuthorizationPolicies.TreeAccessMacros)]
[ParameterSwapControllerActionSelector(nameof(GetById), "id", typeof(int), typeof(Guid), typeof(Udi))]
public class MacrosController : BackOfficeNotificationsController
{
private readonly ParameterEditorCollection _parameterEditorCollection;
@@ -109,7 +109,6 @@ namespace Umbraco.Web.BackOffice.Controllers
}
[HttpGet]
[DetermineAmbiguousActionByPassingParameters]
public ActionResult<MacroDisplay> GetById(int id)
{
var macro = _macroService.GetById(id);
@@ -125,7 +124,6 @@ namespace Umbraco.Web.BackOffice.Controllers
}
[HttpGet]
[DetermineAmbiguousActionByPassingParameters]
public ActionResult<MacroDisplay> GetById(Guid id)
{
var macro = _macroService.GetById(id);
@@ -141,7 +139,6 @@ namespace Umbraco.Web.BackOffice.Controllers
}
[HttpGet]
[DetermineAmbiguousActionByPassingParameters]
public ActionResult<MacroDisplay> GetById(Udi id)
{
var guidUdi = id as GuidUdi;