Skip to content

Commit

Permalink
feat(backoffice): restrict rename & retire
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneD committed Oct 4, 2024
1 parent db0b3eb commit b671852
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace StreetNameRegistry.Api.BackOffice
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Municipality;
using Municipality.Exceptions;
using Swashbuckle.AspNetCore.Filters;
using System.Threading;
using System.Threading.Tasks;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public partial class StreetNameController
[SwaggerResponseExample(StatusCodes.Status412PreconditionFailed, typeof(PreconditionFailedResponseExamples))]
[SwaggerResponseExample(StatusCodes.Status500InternalServerError, typeof(InternalServerErrorResponseExamples))]
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme, Policy = PolicyNames.Adres.DecentraleBijwerker)]
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme, Policy = PolicyNames.Adres.InterneBijwerker)]
public async Task<IActionResult> Rename(
[FromServices] IIfMatchHeaderValidator ifMatchHeaderValidator,
[FromServices] IValidator<RenameStreetNameRequest> validator,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace StreetNameRegistry.Api.BackOffice
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Municipality;
using Municipality.Exceptions;
using Swashbuckle.AspNetCore.Filters;
using System.Threading;
using System.Threading.Tasks;
Expand All @@ -39,6 +38,7 @@ public partial class StreetNameController
[SwaggerResponseExample(StatusCodes.Status412PreconditionFailed, typeof(PreconditionFailedResponseExamples))]
[SwaggerResponseExample(StatusCodes.Status500InternalServerError, typeof(InternalServerErrorResponseExamples))]
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme, Policy = PolicyNames.Adres.DecentraleBijwerker)]
[Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme, Policy = PolicyNames.Adres.InterneBijwerker)]
public async Task<IActionResult> Retire(
[FromServices] IIfMatchHeaderValidator ifMatchHeaderValidator,
[FromRoute] RetireStreetNameRequest request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public IntegrationTests(IntegrationTestFixture fixture)
[InlineData("/v2/straatnamen/1/acties/corrigeren/homoniemtoevoeging", $"{Scopes.DvArAdresBeheer} {Scopes.DvArAdresUitzonderingen}")]
[InlineData("/v2/straatnamen/1/acties/afkeuren", Scopes.DvArAdresBeheer)]
[InlineData("/v2/straatnamen/1/acties/corrigeren/afkeuring", $"{Scopes.DvArAdresBeheer} {Scopes.DvArAdresUitzonderingen}")]
[InlineData("/v2/straatnamen/1/acties/opheffen", Scopes.DvArAdresBeheer)]
[InlineData("/v2/straatnamen/1/acties/hernoemen", Scopes.DvArAdresBeheer)]
[InlineData("/v2/straatnamen/1/acties/opheffen", $"{Scopes.DvArAdresBeheer} {Scopes.DvArAdresUitzonderingen}")]
[InlineData("/v2/straatnamen/1/acties/hernoemen", $"{Scopes.DvArAdresBeheer} {Scopes.DvArAdresUitzonderingen}")]
[InlineData("/v2/straatnamen/1/acties/corrigeren/opheffing", $"{Scopes.DvArAdresBeheer} {Scopes.DvArAdresUitzonderingen}")]
[InlineData("/v2/straatnamen/1/acties/corrigeren/straatnaam", Scopes.DvArAdresBeheer)]
[InlineData("/v2/straatnamen/1/acties/wijzigen/straatnaam", $"{Scopes.DvArAdresBeheer} {Scopes.DvArAdresUitzonderingen}")]
Expand Down

0 comments on commit b671852

Please sign in to comment.