aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Shares/API/Controllers/SharesController.cs
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2026-10-23 14:54:37 -0500
committerJP Dillingham <jp@dillingham.me>2026-10-23 14:54:37 -0500
commitd4447890e5fad1cd942affe051c9479385667465 (patch)
treed0637d2edeece33d9a146d73630a2995fe974792 /src/slskd/Shares/API/Controllers/SharesController.cs
parent3c34fcc3bde265d8c98792a8b7d00c61c4bd06e6 (diff)
downloadslskd-d4447890e5fad1cd942affe051c9479385667465.tar.gz
perms for more controllers, use paranoid check of api keys
Diffstat (limited to 'src/slskd/Shares/API/Controllers/SharesController.cs')
-rw-r--r--src/slskd/Shares/API/Controllers/SharesController.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/slskd/Shares/API/Controllers/SharesController.cs b/src/slskd/Shares/API/Controllers/SharesController.cs
index 76ec4643..64d703bd 100644
--- a/src/slskd/Shares/API/Controllers/SharesController.cs
+++ b/src/slskd/Shares/API/Controllers/SharesController.cs
@@ -148,7 +148,7 @@ namespace slskd.Shares.API
/// <response code="409">A share scan is already in progress.</response>
[HttpPut]
[Route("")]
- [Authorize(Policy = AuthPolicy.Any)]
+ [Authorize(Policy = AuthPolicy.Any, Roles = AuthRole.ReadWriteOrAdministrator)]
[ProducesResponseType(204)]
[ProducesResponseType(409)]
public IActionResult RescanSharesAsync()
@@ -173,7 +173,7 @@ namespace slskd.Shares.API
/// <response code="409">A share scan was not in progress.</response>
[HttpDelete]
[Route("")]
- [Authorize(Policy = AuthPolicy.Any)]
+ [Authorize(Policy = AuthPolicy.Any, Roles = AuthRole.ReadWriteOrAdministrator)]
[ProducesResponseType(204)]
[ProducesResponseType(404)]
public IActionResult CancelShareScan()