diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-10-11 08:53:16 -0500 |
|---|---|---|
| committer | JP Dillingham <jp@dillingham.me> | 2022-10-11 08:53:16 -0500 |
| commit | b56a6650e95b3964d22d0af8c4c44b74d2800c29 (patch) | |
| tree | b325530d3897131c1592183c2ba9b325d1b19925 /src/slskd/Shares/API/Controllers/SharesController.cs | |
| parent | 3c3cfe6f2c3c49c05aa4de1e86a81fcb2c8af590 (diff) | |
| parent | 409f66e9a851625346fb1309f6cd41e6a9770e9c (diff) | |
| download | slskd-b56a6650e95b3964d22d0af8c4c44b74d2800c29.tar.gz | |
Merge remote-tracking branch 'origin/master' into agent
Diffstat (limited to 'src/slskd/Shares/API/Controllers/SharesController.cs')
| -rw-r--r-- | src/slskd/Shares/API/Controllers/SharesController.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/slskd/Shares/API/Controllers/SharesController.cs b/src/slskd/Shares/API/Controllers/SharesController.cs index 5f87f900..d07e8eed 100644 --- a/src/slskd/Shares/API/Controllers/SharesController.cs +++ b/src/slskd/Shares/API/Controllers/SharesController.cs @@ -32,7 +32,6 @@ namespace slskd.Shares.API [Produces("application/json")] [Consumes("application/json")] [Route("api/v{version:apiVersion}/[controller]")] - [Authorize] public class SharesController : ControllerBase { /// <summary> @@ -53,7 +52,7 @@ namespace slskd.Shares.API /// <response code="200">The request completed successfully.</response> /// <returns></returns> [HttpGet("")] - [Authorize] + [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(typeof(IEnumerable<SummarizedShare>), 200)] public async Task<IActionResult> List() { @@ -87,7 +86,7 @@ namespace slskd.Shares.API /// <response code="404">The requested share could not be found.</response> /// <returns></returns> [HttpGet("{id}")] - [Authorize] + [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(typeof(SummarizedShare), 200)] [ProducesResponseType(404)] public async Task<IActionResult> Get(string id) @@ -122,7 +121,7 @@ namespace slskd.Shares.API /// <returns></returns> /// <response code="200">The request completed successfully.</response> [HttpGet("contents")] - [Authorize] + [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(typeof(IEnumerable<Directory>), 200)] public async Task<IActionResult> BrowseAll() { @@ -137,6 +136,7 @@ namespace slskd.Shares.API /// <response code="200">The request completed successfully.</response> /// <response code="404">The requested share could not be found.</response> [HttpGet("{id}/contents")] + [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(typeof(IEnumerable<Directory>), 200)] [ProducesResponseType(404)] public async Task<IActionResult> BrowseShare(string id) @@ -161,7 +161,7 @@ namespace slskd.Shares.API /// <response code="409">A share scan is already in progress.</response> [HttpPut] [Route("")] - [Authorize] + [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(204)] [ProducesResponseType(409)] public IActionResult RescanSharesAsync() @@ -186,7 +186,7 @@ namespace slskd.Shares.API /// <response code="409">A share scan was not in progress.</response> [HttpDelete] [Route("")] - [Authorize] + [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(204)] [ProducesResponseType(404)] public IActionResult CancelShareScan() |
