From 3db630bb3bd862be6df6cfc87ea70cfc5a2ea14c Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Fri, 23 Oct 2026 15:25:05 -0500 Subject: r/w for search starts and stops --- src/slskd/Search/API/Controllers/SearchesController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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 /// The specified was malformed. /// The search terminated abnormally. [HttpPost("")] - [Authorize(Policy = AuthPolicy.Any)] + [Authorize(Policy = AuthPolicy.Any, Roles = AuthRole.ReadWriteOrAdministrator)] public async Task Post([FromBody] SearchRequest request) { if (Program.IsRelayAgent) @@ -207,7 +207,7 @@ namespace slskd.Search.API /// The search was not in progress. /// [HttpPut("{id}")] - [Authorize(Policy = AuthPolicy.Any)] + [Authorize(Policy = AuthPolicy.Any, Roles = AuthRole.ReadWriteOrAdministrator)] [ProducesResponseType(200)] [ProducesResponseType(304)] public async Task Cancel([FromRoute] Guid id) @@ -236,7 +236,7 @@ namespace slskd.Search.API /// A search with the specified id could not be found. /// [HttpDelete("{id}")] - [Authorize(Policy = AuthPolicy.Any)] + [Authorize(Policy = AuthPolicy.Any, Roles = AuthRole.ReadWriteOrAdministrator)] [ProducesResponseType(204)] [ProducesResponseType(404)] public async Task Delete([FromRoute] Guid id) -- cgit v1.2.3