Skip to content

Commit 7eaaa8e

Browse files
committed
Merge branch 'v14/dev' into release/14.0
2 parents 0c5d7b2 + 5296013 commit 7eaaa8e

File tree

78 files changed

+2231
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+2231
-190
lines changed

Directory.Packages.props

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@
1212
</ItemGroup>
1313
<!-- Microsoft packages -->
1414
<ItemGroup>
15-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.4" />
15+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="8.0.5" />
1616
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
17-
<PackageVersion Include="Microsoft.Data.Sqlite" Version="8.0.4" />
18-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.4" />
19-
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
20-
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.4" />
17+
<PackageVersion Include="Microsoft.Data.Sqlite" Version="8.0.5" />
18+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.5" />
19+
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.5" />
20+
<PackageVersion Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.5" />
2121
<PackageVersion Include="Microsoft.Extensions.Caching.Abstractions" Version="8.0.0" />
2222
<PackageVersion Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
2323
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="8.0.0" />
2424
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
2525
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
26-
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.4" />
26+
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.5" />
2727
<PackageVersion Include="Microsoft.Extensions.FileProviders.Physical" Version="8.0.0" />
2828
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
2929
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.0" />
30-
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="8.0.4" />
31-
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="8.0.4" />
30+
<PackageVersion Include="Microsoft.Extensions.Identity.Core" Version="8.0.5" />
31+
<PackageVersion Include="Microsoft.Extensions.Identity.Stores" Version="8.0.5" />
3232
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
3333
<PackageVersion Include="Microsoft.Extensions.Options" Version="8.0.2" />
3434
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
@@ -46,20 +46,20 @@
4646
<PackageVersion Include="Dazinator.Extensions.FileProviders" Version="2.0.0" />
4747
<PackageVersion Include="Examine" Version="3.2.0" />
4848
<PackageVersion Include="Examine.Core" Version="3.2.0" />
49-
<PackageVersion Include="HtmlAgilityPack" Version="1.11.60" />
50-
<PackageVersion Include="JsonPatch.Net" Version="3.0.0" />
49+
<PackageVersion Include="HtmlAgilityPack" Version="1.11.61" />
50+
<PackageVersion Include="JsonPatch.Net" Version="3.1.0" />
5151
<PackageVersion Include="K4os.Compression.LZ4" Version="1.3.8" />
52-
<PackageVersion Include="MailKit" Version="4.5.0" />
52+
<PackageVersion Include="MailKit" Version="4.6.0" />
5353
<PackageVersion Include="Markdown" Version="2.2.1" />
5454
<PackageVersion Include="MessagePack" Version="2.5.140" />
5555
<PackageVersion Include="MiniProfiler.AspNetCore.Mvc" Version="4.3.8" />
5656
<PackageVersion Include="MiniProfiler.Shared" Version="4.3.8" />
5757
<PackageVersion Include="ncrontab" Version="3.3.3" />
5858
<PackageVersion Include="NPoco" Version="5.7.1" />
5959
<PackageVersion Include="NPoco.SqlServer" Version="5.7.1" />
60-
<PackageVersion Include="OpenIddict.Abstractions" Version="5.4.0" />
61-
<PackageVersion Include="OpenIddict.AspNetCore" Version="5.4.0" />
62-
<PackageVersion Include="OpenIddict.EntityFrameworkCore" Version="5.4.0" />
60+
<PackageVersion Include="OpenIddict.Abstractions" Version="5.6.0" />
61+
<PackageVersion Include="OpenIddict.AspNetCore" Version="5.6.0" />
62+
<PackageVersion Include="OpenIddict.EntityFrameworkCore" Version="5.6.0" />
6363
<PackageVersion Include="Serilog" Version="3.1.1" />
6464
<PackageVersion Include="Serilog.AspNetCore" Version="8.0.1" />
6565
<PackageVersion Include="Serilog.Enrichers.Process" Version="2.0.2" />
@@ -74,17 +74,17 @@
7474
<PackageVersion Include="Serilog.Sinks.Map" Version="1.0.2" />
7575
<PackageVersion Include="SixLabors.ImageSharp" Version="3.1.4" />
7676
<PackageVersion Include="SixLabors.ImageSharp.Web" Version="3.1.2" />
77-
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.5.0" />
77+
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.6.2" />
7878
</ItemGroup>
7979
<!-- Transitive pinned versions (only required because our direct dependencies have vulnerable versions of transitive dependencies) -->
8080
<ItemGroup>
8181
<!-- Both Microsoft.EntityFrameworkCore.SqlServer and NPoco.SqlServer bring in a vulnerable version of Azure.Identity -->
82-
<PackageVersion Include="Azure.Identity" Version="1.11.0" />
82+
<PackageVersion Include="Azure.Identity" Version="1.11.3" />
8383
<!-- Dazinator.Extensions.FileProviders brings in a vulnerable version of System.Net.Http -->
8484
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
8585
<!-- Examine brings in a vulnerable version of System.Security.Cryptography.Xml -->
86-
<PackageVersion Include="System.Security.Cryptography.Xml" Version="8.0.0" />
86+
<PackageVersion Include="System.Security.Cryptography.Xml" Version="8.0.1" />
8787
<!-- Both Dazinator.Extensions.FileProviders and MiniProfiler.AspNetCore.Mvc bring in a vulnerable version of System.Text.RegularExpressions -->
8888
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
8989
</ItemGroup>
90-
</Project>
90+
</Project>
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
using Microsoft.AspNetCore.Authorization;
2-
using Microsoft.AspNetCore.Mvc;
1+
using Microsoft.AspNetCore.Mvc;
32
using Umbraco.Cms.Api.Management.Routing;
43
using Umbraco.Cms.Core;
5-
using Umbraco.Cms.Web.Common.Authorization;
64

75
namespace Umbraco.Cms.Api.Management.Controllers.DataType.Item;
86

97
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.DataType}")]
108
[ApiExplorerSettings(GroupName = "Data Type")]
11-
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocumentsOrDocumentTypes)]
129
public class DatatypeItemControllerBase : ManagementApiControllerBase
1310
{
1411
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
using Microsoft.AspNetCore.Authorization;
2-
using Microsoft.AspNetCore.Mvc;
1+
using Microsoft.AspNetCore.Mvc;
32
using Umbraco.Cms.Api.Management.Routing;
43
using Umbraco.Cms.Core;
5-
using Umbraco.Cms.Web.Common.Authorization;
64

75
namespace Umbraco.Cms.Api.Management.Controllers.Dictionary.Item;
86

97
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/dictionary")]
108
[ApiExplorerSettings(GroupName = "Dictionary")]
11-
[Authorize(Policy = AuthorizationPolicies.TreeAccessDictionary)]
129
public class DictionaryItemControllerBase : ManagementApiControllerBase
1310
{
1411
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
using Microsoft.AspNetCore.Authorization;
2-
using Microsoft.AspNetCore.Mvc;
1+
using Microsoft.AspNetCore.Mvc;
32
using Umbraco.Cms.Api.Management.Routing;
43
using Umbraco.Cms.Core;
5-
using Umbraco.Cms.Web.Common.Authorization;
64

75
namespace Umbraco.Cms.Api.Management.Controllers.Document.Item;
86

97
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.Document}")]
108
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Document))]
11-
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocuments)]
129
public class DocumentItemControllerBase : ManagementApiControllerBase
1310
{
1411
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
using Microsoft.AspNetCore.Authorization;
2-
using Microsoft.AspNetCore.Mvc;
1+
using Microsoft.AspNetCore.Mvc;
32
using Umbraco.Cms.Api.Management.Routing;
43
using Umbraco.Cms.Core;
5-
using Umbraco.Cms.Web.Common.Authorization;
64

75
namespace Umbraco.Cms.Api.Management.Controllers.DocumentBlueprint.Item;
86

97
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.DocumentBlueprint}")]
108
[ApiExplorerSettings(GroupName = "Document Blueprint")]
11-
[Authorize(Policy = AuthorizationPolicies.SectionAccessContent)]
129
public class DocumentBlueprintItemControllerBase : ManagementApiControllerBase
1310
{
1411
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
using Microsoft.AspNetCore.Authorization;
2-
using Microsoft.AspNetCore.Mvc;
1+
using Microsoft.AspNetCore.Mvc;
32
using Umbraco.Cms.Api.Management.Routing;
43
using Umbraco.Cms.Core;
5-
using Umbraco.Cms.Web.Common.Authorization;
64

75
namespace Umbraco.Cms.Api.Management.Controllers.DocumentType.Item;
86

97
[VersionedApiBackOfficeRoute( $"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.DocumentType}")]
108
[ApiExplorerSettings(GroupName = "Document Type")]
11-
[Authorize(Policy = AuthorizationPolicies.TreeAccessDocumentTypes)]
129
public class DocumentTypeItemControllerBase : ManagementApiControllerBase
1310
{
1411
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
using Microsoft.AspNetCore.Authorization;
2-
using Microsoft.AspNetCore.Mvc;
1+
using Microsoft.AspNetCore.Mvc;
32
using Umbraco.Cms.Api.Management.Routing;
43
using Umbraco.Cms.Core;
5-
using Umbraco.Cms.Web.Common.Authorization;
64

75
namespace Umbraco.Cms.Api.Management.Controllers.Language.Item;
86

97
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.Language}")]
108
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Language))]
11-
[Authorize(Policy = AuthorizationPolicies.TreeAccessLanguages)]
129
public class LanguageItemControllerBase : ManagementApiControllerBase
1310
{
1411
}
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
using Asp.Versioning;
2-
using Microsoft.AspNetCore.Authorization;
3-
using Microsoft.AspNetCore.Mvc;
1+
using Microsoft.AspNetCore.Mvc;
42
using Umbraco.Cms.Api.Management.Routing;
53
using Umbraco.Cms.Core;
6-
using Umbraco.Cms.Web.Common.Authorization;
74

85
namespace Umbraco.Cms.Api.Management.Controllers.Media.Item;
96

107
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.Media}")]
118
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Media))]
12-
[Authorize(Policy = AuthorizationPolicies.SectionAccessForMediaTree)]
139
public class MediaItemControllerBase : ManagementApiControllerBase
1410
{
1511
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using Asp.Versioning;
2+
using Microsoft.AspNetCore.Http;
3+
using Microsoft.AspNetCore.Mvc;
4+
using Umbraco.Cms.Api.Management.ViewModels.MediaType.Item;
5+
using Umbraco.Cms.Core.Mapping;
6+
using Umbraco.Cms.Core.Models;
7+
using Umbraco.Cms.Core.Services.ContentTypeEditing;
8+
9+
namespace Umbraco.Cms.Api.Management.Controllers.MediaType.Item;
10+
11+
[ApiVersion("1.0")]
12+
public class FolderMediaTypeItemController : MediaTypeItemControllerBase
13+
{
14+
private readonly IMediaTypeEditingService _mediaTypeEditingService;
15+
private readonly IUmbracoMapper _mapper;
16+
17+
public FolderMediaTypeItemController(IMediaTypeEditingService mediaTypeEditingService, IUmbracoMapper mapper)
18+
{
19+
_mediaTypeEditingService = mediaTypeEditingService;
20+
_mapper = mapper;
21+
}
22+
23+
[HttpGet("folders")]
24+
[MapToApiVersion("1.0")]
25+
[ProducesResponseType(typeof(PagedModel<MediaTypeItemResponseModel>), StatusCodes.Status200OK)]
26+
public async Task<IActionResult> Folders(CancellationToken cancellationToken, int skip = 0, int take = 100)
27+
{
28+
PagedModel<IMediaType> mediaTypes = await _mediaTypeEditingService.GetFolderMediaTypes(skip, take);
29+
30+
var result = new PagedModel<MediaTypeItemResponseModel>
31+
{
32+
Items = _mapper.MapEnumerable<IMediaType, MediaTypeItemResponseModel>(mediaTypes.Items),
33+
Total = mediaTypes.Total
34+
};
35+
return Ok(result);
36+
}
37+
}
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
using Microsoft.AspNetCore.Authorization;
2-
using Microsoft.AspNetCore.Mvc;
1+
using Microsoft.AspNetCore.Mvc;
32
using Umbraco.Cms.Api.Management.Routing;
43
using Umbraco.Cms.Core;
5-
using Umbraco.Cms.Web.Common.Authorization;
64

75
namespace Umbraco.Cms.Api.Management.Controllers.MediaType.Item;
86

97
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Item}/{Constants.UdiEntityType.MediaType}")]
108
[ApiExplorerSettings(GroupName = "Media Type")]
11-
[Authorize(Policy = AuthorizationPolicies.TreeAccessMediaTypes)]
129
public class MediaTypeItemControllerBase : ManagementApiControllerBase
1310
{
1411
}

0 commit comments

Comments
 (0)