aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Search
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-10-28 19:13:25 -0500
committerGitHub <noreply@github.com>2026-10-28 19:13:25 -0500
commit2e127575c5231ea94a2f327084c5da29b8a9e895 (patch)
treec155815345acac601326890d66d0ea8faf29fce3 /src/slskd/Search
parent47c0c9fccbe976c1d1f8f71c6b0bfd45bceda1a4 (diff)
parent2b827344d11e7490b323defa898264cadbdb6089 (diff)
downloadslskd-2e127575c5231ea94a2f327084c5da29b8a9e895.tar.gz
Merge branch 'master' into bugs
Diffstat (limited to 'src/slskd/Search')
-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)