aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-10-23 15:25:05 -0500
committerJP Dillingham <jp@dillingham.me>2026-10-23 15:25:05 -0500
commit3db630bb3bd862be6df6cfc87ea70cfc5a2ea14c (patch)
treeb8171fe9f864bc130a9b81fc235189dcf5b87125 /src/slskd
parente2d08d3f96f10994882e35fc4ece9e146d673e2f (diff)
downloadslskd-3db630bb3bd862be6df6cfc87ea70cfc5a2ea14c.tar.gz
r/w for search starts and stops
Diffstat (limited to 'src/slskd')
-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)