File tree 12 files changed +37
-10
lines changed
src/Umbraco.Cms.Api.Management/Controllers
12 files changed +37
-10
lines changed Original file line number Diff line number Diff line change 1
1
using Asp . Versioning ;
2
+ using Microsoft . AspNetCore . Authorization ;
2
3
using Microsoft . AspNetCore . Http ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
5
using Umbraco . Cms . Api . Management . ViewModels . DataType ;
7
8
using Umbraco . Cms . Core . Security ;
8
9
using Umbraco . Cms . Core . Services ;
9
10
using Umbraco . Cms . Core . Services . OperationStatus ;
11
+ using Umbraco . Cms . Web . Common . Authorization ;
10
12
11
13
namespace Umbraco . Cms . Api . Management . Controllers . DataType ;
12
14
13
15
[ ApiVersion ( "1.0" ) ]
16
+ [ Authorize ( Policy = AuthorizationPolicies . TreeAccessDataTypes ) ]
14
17
public class CopyDataTypeController : DataTypeControllerBase
15
18
{
16
19
private readonly IDataTypeService _dataTypeService ;
Original file line number Diff line number Diff line change 1
- using Asp . Versioning ;
1
+ using Asp . Versioning ;
2
+ using Microsoft . AspNetCore . Authorization ;
2
3
using Microsoft . AspNetCore . Http ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
5
using Umbraco . Cms . Api . Management . Factories ;
8
9
using Umbraco . Cms . Core . Security ;
9
10
using Umbraco . Cms . Core . Services ;
10
11
using Umbraco . Cms . Core . Services . OperationStatus ;
12
+ using Umbraco . Cms . Web . Common . Authorization ;
11
13
12
14
namespace Umbraco . Cms . Api . Management . Controllers . DataType ;
13
15
14
16
[ ApiVersion ( "1.0" ) ]
17
+ [ Authorize ( Policy = AuthorizationPolicies . TreeAccessDataTypes ) ]
15
18
public class CreateDataTypeController : DataTypeControllerBase
16
19
{
17
20
private readonly IDataTypeService _dataTypeService ;
Original file line number Diff line number Diff line change 1
- using Asp . Versioning ;
1
+ using Asp . Versioning ;
2
+ using Microsoft . AspNetCore . Authorization ;
2
3
using Microsoft . AspNetCore . Http ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
5
using Umbraco . Cms . Core ;
5
6
using Umbraco . Cms . Core . Models ;
6
7
using Umbraco . Cms . Core . Security ;
7
8
using Umbraco . Cms . Core . Services ;
8
9
using Umbraco . Cms . Core . Services . OperationStatus ;
10
+ using Umbraco . Cms . Web . Common . Authorization ;
9
11
10
12
namespace Umbraco . Cms . Api . Management . Controllers . DataType ;
11
13
12
14
[ ApiVersion ( "1.0" ) ]
15
+ [ Authorize ( Policy = AuthorizationPolicies . TreeAccessDataTypes ) ]
13
16
public class DeleteDataTypeController : DataTypeControllerBase
14
17
{
15
18
private readonly IDataTypeService _dataTypeService ;
Original file line number Diff line number Diff line change 1
1
using Asp . Versioning ;
2
+ using Microsoft . AspNetCore . Authorization ;
2
3
using Microsoft . AspNetCore . Http ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
5
using Umbraco . Cms . Api . Management . ViewModels . DataType ;
7
8
using Umbraco . Cms . Core . Security ;
8
9
using Umbraco . Cms . Core . Services ;
9
10
using Umbraco . Cms . Core . Services . OperationStatus ;
11
+ using Umbraco . Cms . Web . Common . Authorization ;
10
12
11
13
namespace Umbraco . Cms . Api . Management . Controllers . DataType ;
12
14
13
15
[ ApiVersion ( "1.0" ) ]
16
+ [ Authorize ( Policy = AuthorizationPolicies . TreeAccessDataTypes ) ]
14
17
public class MoveDataTypeController : DataTypeControllerBase
15
18
{
16
19
private readonly IDataTypeService _dataTypeService ;
Original file line number Diff line number Diff line change 1
- using Asp . Versioning ;
1
+ using Asp . Versioning ;
2
+ using Microsoft . AspNetCore . Authorization ;
2
3
using Microsoft . AspNetCore . Http ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
5
using Umbraco . Cms . Api . Management . Factories ;
8
9
using Umbraco . Cms . Core . Security ;
9
10
using Umbraco . Cms . Core . Services ;
10
11
using Umbraco . Cms . Core . Services . OperationStatus ;
12
+ using Umbraco . Cms . Web . Common . Authorization ;
11
13
12
14
namespace Umbraco . Cms . Api . Management . Controllers . DataType ;
13
15
14
16
[ ApiVersion ( "1.0" ) ]
17
+ [ Authorize ( Policy = AuthorizationPolicies . TreeAccessDataTypes ) ]
15
18
public class UpdateDataTypeController : DataTypeControllerBase
16
19
{
17
20
private readonly IDataTypeService _dataTypeService ;
Original file line number Diff line number Diff line change 1
1
using Asp . Versioning ;
2
+ using Microsoft . AspNetCore . Authorization ;
2
3
using Microsoft . AspNetCore . Http ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
5
using Umbraco . Cms . Api . Management . Factories ;
5
6
using Umbraco . Cms . Core . Models ;
6
7
using Umbraco . Cms . Core . Services ;
7
8
using Umbraco . Cms . Core . Services . OperationStatus ;
9
+ using Umbraco . Cms . Web . Common . Authorization ;
8
10
9
11
namespace Umbraco . Cms . Api . Management . Controllers . DocumentType ;
10
12
11
13
[ ApiVersion ( "1.0" ) ]
14
+ [ Authorize ( Policy = AuthorizationPolicies . TreeAccessDocumentTypes ) ]
12
15
public class ExportDocumentTypeController : DocumentTypeControllerBase
13
16
{
14
17
private readonly IContentTypeService _contentTypeService ;
Original file line number Diff line number Diff line change 1
1
using Asp . Versioning ;
2
+ using Microsoft . AspNetCore . Authorization ;
2
3
using Microsoft . AspNetCore . Http ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
5
using Umbraco . Cms . Api . Management . ViewModels . DocumentType ;
5
6
using Umbraco . Cms . Core ;
6
7
using Umbraco . Cms . Core . Models ;
7
- using Umbraco . Cms . Core . Models . Membership ;
8
8
using Umbraco . Cms . Core . Security ;
9
9
using Umbraco . Cms . Core . Services . ImportExport ;
10
10
using Umbraco . Cms . Core . Services . OperationStatus ;
11
+ using Umbraco . Cms . Web . Common . Authorization ;
11
12
12
13
namespace Umbraco . Cms . Api . Management . Controllers . DocumentType ;
13
14
14
15
[ ApiVersion ( "1.0" ) ]
16
+ [ Authorize ( Policy = AuthorizationPolicies . TreeAccessDocumentTypes ) ]
15
17
public class ImportExistingDocumentTypeController : DocumentTypeControllerBase
16
18
{
17
19
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor ;
Original file line number Diff line number Diff line change 1
1
using Asp . Versioning ;
2
+ using Microsoft . AspNetCore . Authorization ;
2
3
using Microsoft . AspNetCore . Http ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
5
using Umbraco . Cms . Api . Management . ViewModels . DocumentType ;
5
6
using Umbraco . Cms . Core ;
6
7
using Umbraco . Cms . Core . Models ;
7
- using Umbraco . Cms . Core . Models . Membership ;
8
8
using Umbraco . Cms . Core . Security ;
9
9
using Umbraco . Cms . Core . Services . ImportExport ;
10
10
using Umbraco . Cms . Core . Services . OperationStatus ;
11
+ using Umbraco . Cms . Web . Common . Authorization ;
11
12
12
13
namespace Umbraco . Cms . Api . Management . Controllers . DocumentType ;
13
14
14
15
[ ApiVersion ( "1.0" ) ]
16
+ [ Authorize ( Policy = AuthorizationPolicies . TreeAccessDocumentTypes ) ]
15
17
public class ImportNewDocumentTypeController : DocumentTypeControllerBase
16
18
{
17
19
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor ;
Original file line number Diff line number Diff line change 1
1
using Asp . Versioning ;
2
+ using Microsoft . AspNetCore . Authorization ;
2
3
using Microsoft . AspNetCore . Http ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
5
using Umbraco . Cms . Api . Management . Factories ;
5
6
using Umbraco . Cms . Core . Models ;
6
7
using Umbraco . Cms . Core . Services ;
7
8
using Umbraco . Cms . Core . Services . OperationStatus ;
9
+ using Umbraco . Cms . Web . Common . Authorization ;
8
10
9
11
namespace Umbraco . Cms . Api . Management . Controllers . MediaType ;
10
12
11
13
[ ApiVersion ( "1.0" ) ]
14
+ [ Authorize ( Policy = AuthorizationPolicies . TreeAccessMediaTypes ) ]
12
15
public class ExportMediaTypeController : MediaTypeControllerBase
13
16
{
14
17
private readonly IMediaTypeService _mediaTypeService ;
Original file line number Diff line number Diff line change 1
1
using Asp . Versioning ;
2
+ using Microsoft . AspNetCore . Authorization ;
2
3
using Microsoft . AspNetCore . Http ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
5
using Umbraco . Cms . Api . Management . ViewModels . MediaType ;
5
6
using Umbraco . Cms . Core ;
6
7
using Umbraco . Cms . Core . Models ;
7
- using Umbraco . Cms . Core . Models . Membership ;
8
8
using Umbraco . Cms . Core . Security ;
9
9
using Umbraco . Cms . Core . Services . ImportExport ;
10
10
using Umbraco . Cms . Core . Services . OperationStatus ;
11
+ using Umbraco . Cms . Web . Common . Authorization ;
11
12
12
13
namespace Umbraco . Cms . Api . Management . Controllers . MediaType ;
13
14
14
15
[ ApiVersion ( "1.0" ) ]
16
+ [ Authorize ( Policy = AuthorizationPolicies . TreeAccessMediaTypes ) ]
15
17
public class ImportExistingMediaTypeController : MediaTypeControllerBase
16
18
{
17
19
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor ;
Original file line number Diff line number Diff line change 1
1
using Asp . Versioning ;
2
+ using Microsoft . AspNetCore . Authorization ;
2
3
using Microsoft . AspNetCore . Http ;
3
4
using Microsoft . AspNetCore . Mvc ;
4
- using Umbraco . Cms . Api . Management . Controllers . DocumentType ;
5
5
using Umbraco . Cms . Api . Management . ViewModels . MediaType ;
6
6
using Umbraco . Cms . Core ;
7
7
using Umbraco . Cms . Core . Models ;
8
- using Umbraco . Cms . Core . Models . Membership ;
9
8
using Umbraco . Cms . Core . Security ;
10
9
using Umbraco . Cms . Core . Services . ImportExport ;
11
10
using Umbraco . Cms . Core . Services . OperationStatus ;
11
+ using Umbraco . Cms . Web . Common . Authorization ;
12
12
13
13
namespace Umbraco . Cms . Api . Management . Controllers . MediaType ;
14
14
15
15
[ ApiVersion ( "1.0" ) ]
16
+ [ Authorize ( Policy = AuthorizationPolicies . TreeAccessMediaTypes ) ]
16
17
public class ImportNewMediaTypeController : MediaTypeControllerBase
17
18
{
18
19
private readonly IBackOfficeSecurityAccessor _backOfficeSecurityAccessor ;
Original file line number Diff line number Diff line change 1
- using Microsoft . AspNetCore . Authorization ;
1
+ using Microsoft . AspNetCore . Authorization ;
2
2
using Microsoft . AspNetCore . Http ;
3
3
using Microsoft . AspNetCore . Mvc ;
4
4
using Umbraco . Cms . Api . Management . Controllers . DocumentType ;
5
5
using Umbraco . Cms . Api . Management . Routing ;
6
- using Umbraco . Cms . Api . Management . ViewModels . MediaType ;
7
6
using Umbraco . Cms . Core ;
8
7
using Umbraco . Cms . Core . Services . OperationStatus ;
9
8
using Umbraco . Cms . Web . Common . Authorization ;
You can’t perform that action at this time.
0 commit comments