aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Shares/API/Controllers/SharesController.cs
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/Shares/API/Controllers/SharesController.cs
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/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()