Skip to content

Commit

Permalink
Don't set authorization by default
Browse files Browse the repository at this point in the history
Otherwise we will not be able to access the STAC controllers. The
authorization must be be updated at a later date anyway, so we
check it again then.
  • Loading branch information
tschumpr committed Nov 20, 2023
1 parent 43b7988 commit 7fe75c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/GeoCop.Api/Controllers/DeliveryController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using GeoCop.Api.Contracts;
using GeoCop.Api.Models;
using GeoCop.Api.Validation;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;

Expand All @@ -11,6 +12,7 @@ namespace GeoCop.Api.Controllers
/// Controller for declaring deliveries.
/// </summary>
[ApiController]
[Authorize]
[Route("api/v{version:apiVersion}/[controller]")]
public class DeliveryController : ControllerBase
{
Expand Down
4 changes: 0 additions & 4 deletions src/GeoCop.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@
builder.Services
.AddControllers(options =>
{
var policy = new AuthorizationPolicyBuilder()
.RequireAuthenticatedUser()
.Build();
options.Filters.Add(new AuthorizeFilter(policy));
})
.AddJsonOptions(options =>
{
Expand Down

0 comments on commit 7fe75c9

Please sign in to comment.