aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Search/API
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-10-25 16:23:07 -0500
committerGitHub <noreply@github.com>2026-10-25 16:23:07 -0500
commit2b827344d11e7490b323defa898264cadbdb6089 (patch)
tree57fedb94861bb4116a8aed9cc7fecb5e87aa06ff /src/slskd/Search/API
parenta4cce04d38544ad6d4c1506b9facb32407a79509 (diff)
parentbe81b3b85b21d502feaf4918a0da92f445f7c2ab (diff)
downloadslskd-2b827344d11e7490b323defa898264cadbdb6089.tar.gz
Merge pull request #1911 from slskd/auth
Refine access levels on a number of endpoints, number of small tweaks and adjustments
Diffstat (limited to 'src/slskd/Search/API')
-rw-r--r--src/slskd/Search/API/Controllers/SearchesController.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/slskd/Search/API/Controllers/SearchesController.cs b/src/slskd/Search/API/Controllers/SearchesController.cs
index 99214410..a573c1e0 100644
--- a/src/slskd/Search/API/Controllers/SearchesController.cs
+++ b/src/slskd/Search/API/Controllers/SearchesController.cs
@@ -78,7 +78,7 @@ namespace slskd.Search.API
/// <response code="400">The specified <paramref name="request"/> was malformed.</response>
/// <response code="500">The search terminated abnormally.</response>
[HttpPost("")]
- [Authorize(Policy = AuthPolicy.Any)]
+ [Authorize(Policy = AuthPolicy.Any, Roles = AuthRole.ReadWriteOrAdministrator)]
public async Task<IActionResult> Post([FromBody] SearchRequest request)
{
if (Program.IsRelayAgent)
@@ -207,7 +207,7 @@ namespace slskd.Search.API
/// <response code="304">The search was not in progress.</response>
/// <returns></returns>
[HttpPut("{id}")]
- [Authorize(Policy = AuthPolicy.Any)]
+ [Authorize(Policy = AuthPolicy.Any, Roles = AuthRole.ReadWriteOrAdministrator)]
[ProducesResponseType(200)]
[ProducesResponseType(304)]
public async Task<IActionResult> Cancel([FromRoute] Guid id)
@@ -236,7 +236,7 @@ namespace slskd.Search.API
/// <response code="404">A search with the specified id could not be found.</response>
/// <returns></returns>
[HttpDelete("{id}")]
- [Authorize(Policy = AuthPolicy.Any)]
+ [Authorize(Policy = AuthPolicy.Any, Roles = AuthRole.ReadWriteOrAdministrator)]
[ProducesResponseType(204)]
[ProducesResponseType(404)]
public async Task<IActionResult> Delete([FromRoute] Guid id)