-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v14/dev' into release/14.0
- Loading branch information
Showing
78 changed files
with
2,231 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Cms.Api.Management/Controllers/DataType/Item/DatatypeItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.DataType.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.DataType}")] | ||
[ApiExplorerSettings(GroupName = "Data Type")] | ||
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocumentsOrDocumentTypes)] | ||
public class DatatypeItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Cms.Api.Management/Controllers/Dictionary/Item/DictionaryItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.Dictionary.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/dictionary")] | ||
[ApiExplorerSettings(GroupName = "Dictionary")] | ||
[Authorize(Policy = AuthorizationPolicies.TreeAccessDictionary)] | ||
public class DictionaryItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Cms.Api.Management/Controllers/Document/Item/DocumentItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.Document.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.Document}")] | ||
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Document))] | ||
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocuments)] | ||
public class DocumentItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
5 changes: 1 addition & 4 deletions
5
....Api.Management/Controllers/DocumentBlueprint/Item/DocumentBlueprintItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.DocumentBlueprint.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.DocumentBlueprint}")] | ||
[ApiExplorerSettings(GroupName = "Document Blueprint")] | ||
[Authorize(Policy = AuthorizationPolicies.SectionAccessContent)] | ||
public class DocumentBlueprintItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
5 changes: 1 addition & 4 deletions
5
...mbraco.Cms.Api.Management/Controllers/DocumentType/Item/DocumentTypeItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.DocumentType.Item; | ||
|
||
[VersionedApiBackOfficeRoute( $"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.DocumentType}")] | ||
[ApiExplorerSettings(GroupName = "Document Type")] | ||
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocumentTypes)] | ||
public class DocumentTypeItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Cms.Api.Management/Controllers/Language/Item/LanguageItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.Language.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.Language}")] | ||
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Language))] | ||
[Authorize(Policy = AuthorizationPolicies.TreeAccessLanguages)] | ||
public class LanguageItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
6 changes: 1 addition & 5 deletions
6
src/Umbraco.Cms.Api.Management/Controllers/Media/Item/MediaItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
using Asp.Versioning; | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.Media.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.Media}")] | ||
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Media))] | ||
[Authorize(Policy = AuthorizationPolicies.SectionAccessForMediaTree)] | ||
public class MediaItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
37 changes: 37 additions & 0 deletions
37
src/Umbraco.Cms.Api.Management/Controllers/MediaType/Item/FolderMediaTypeItemController.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using Asp.Versioning; | ||
using Microsoft.AspNetCore.Http; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.ViewModels.MediaType.Item; | ||
using Umbraco.Cms.Core.Mapping; | ||
using Umbraco.Cms.Core.Models; | ||
using Umbraco.Cms.Core.Services.ContentTypeEditing; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.MediaType.Item; | ||
|
||
[ApiVersion("1.0")] | ||
public class FolderMediaTypeItemController : MediaTypeItemControllerBase | ||
{ | ||
private readonly IMediaTypeEditingService _mediaTypeEditingService; | ||
private readonly IUmbracoMapper _mapper; | ||
|
||
public FolderMediaTypeItemController(IMediaTypeEditingService mediaTypeEditingService, IUmbracoMapper mapper) | ||
{ | ||
_mediaTypeEditingService = mediaTypeEditingService; | ||
_mapper = mapper; | ||
} | ||
|
||
[HttpGet("folders")] | ||
[MapToApiVersion("1.0")] | ||
[ProducesResponseType(typeof(PagedModel<MediaTypeItemResponseModel>), StatusCodes.Status200OK)] | ||
public async Task<IActionResult> Folders(CancellationToken cancellationToken, int skip = 0, int take = 100) | ||
{ | ||
PagedModel<IMediaType> mediaTypes = await _mediaTypeEditingService.GetFolderMediaTypes(skip, take); | ||
|
||
var result = new PagedModel<MediaTypeItemResponseModel> | ||
{ | ||
Items = _mapper.MapEnumerable<IMediaType, MediaTypeItemResponseModel>(mediaTypes.Items), | ||
Total = mediaTypes.Total | ||
}; | ||
return Ok(result); | ||
} | ||
} |
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Cms.Api.Management/Controllers/MediaType/Item/MediaTypeItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.MediaType.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.MediaType}")] | ||
[ApiExplorerSettings(GroupName = "Media Type")] | ||
[Authorize(Policy = AuthorizationPolicies.TreeAccessMediaTypes)] | ||
public class MediaTypeItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Cms.Api.Management/Controllers/Member/Item/MemberItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.Member.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.Member}")] | ||
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Member))] | ||
[Authorize(Policy = AuthorizationPolicies.SectionAccessForMemberTree)] | ||
public class MemberItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Cms.Api.Management/Controllers/MemberGroup/Item/MemberGroupItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.MemberGroup.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.MemberGroup}")] | ||
[ApiExplorerSettings(GroupName = "Member Group")] | ||
[Authorize(Policy = AuthorizationPolicies.TreeAccessMemberGroups)] | ||
public class MemberGroupItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Cms.Api.Management/Controllers/PartialView/Item/PartialViewItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.PartialView.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.PartialView}")] | ||
[ApiExplorerSettings(GroupName = "Partial View")] | ||
[Authorize(Policy = AuthorizationPolicies.TreeAccessPartialViews)] | ||
public class PartialViewItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
5 changes: 1 addition & 4 deletions
5
...mbraco.Cms.Api.Management/Controllers/RelationType/Item/RelationTypeItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.RelationType.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.RelationType}")] | ||
[ApiExplorerSettings(GroupName = "Relation Type")] | ||
[Authorize(Policy = AuthorizationPolicies.TreeAccessRelationTypes)] | ||
public class RelationTypeItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Cms.Api.Management/Controllers/Script/Item/ScriptItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.Script.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.Script}")] | ||
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Script))] | ||
[Authorize(Policy = AuthorizationPolicies.TreeAccessScripts)] | ||
public class ScriptItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Cms.Api.Management/Controllers/Stylesheet/Item/StylesheetItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.Stylesheet.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.Stylesheet}")] | ||
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Stylesheet))] | ||
[Authorize(Policy = AuthorizationPolicies.TreeAccessStylesheets)] | ||
public class StylesheetItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Cms.Api.Management/Controllers/Template/Item/TemplateItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.Template.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.Template}")] | ||
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Template))] | ||
[Authorize(Policy = AuthorizationPolicies.TreeAccessTemplates)] | ||
public class TemplateItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
5 changes: 1 addition & 4 deletions
5
src/Umbraco.Cms.Api.Management/Controllers/UserGroup/Item/UserGroupItemControllerBase.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
using Microsoft.AspNetCore.Authorization; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Microsoft.AspNetCore.Mvc; | ||
using Umbraco.Cms.Api.Management.Routing; | ||
using Umbraco.Cms.Core; | ||
using Umbraco.Cms.Web.Common.Authorization; | ||
|
||
namespace Umbraco.Cms.Api.Management.Controllers.UserGroup.Item; | ||
|
||
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/user-group")] | ||
[ApiExplorerSettings(GroupName = "User Group")] | ||
[Authorize(Policy = AuthorizationPolicies.SectionAccessUsers)] | ||
public class UserGroupItemControllerBase : ManagementApiControllerBase | ||
{ | ||
} |
Oops, something went wrong.