diff options
| author | JP Dillingham <jp@dillingham.me> | 2023-03-21 17:26:05 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-21 17:26:05 -0500 |
| commit | 664b01cfc85d7c71ad40049bd2f2066916de456c (patch) | |
| tree | 063f9f4d5e2b13899aac7faccc03d5fea5c0b479 /src/slskd/Core/API/Controllers/OptionsController.cs | |
| parent | bd4c10a559e9347be1313c544c4a590e41edca19 (diff) | |
| parent | 388e567bdf78eb7aade2db7187e1e806d172d932 (diff) | |
| download | slskd-664b01cfc85d7c71ad40049bd2f2066916de456c.tar.gz | |
Merge pull request #892 from slskd/underscores
Use `instance_name` from Relay Agent config instead of map key
Diffstat (limited to 'src/slskd/Core/API/Controllers/OptionsController.cs')
| -rw-r--r-- | src/slskd/Core/API/Controllers/OptionsController.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/slskd/Core/API/Controllers/OptionsController.cs b/src/slskd/Core/API/Controllers/OptionsController.cs index 961571a0..da8fb5f0 100644 --- a/src/slskd/Core/API/Controllers/OptionsController.cs +++ b/src/slskd/Core/API/Controllers/OptionsController.cs @@ -82,7 +82,7 @@ namespace slskd.Core.API /// <returns></returns> [HttpGet] [Route("debug")] - [Authorize(Policy = AuthPolicy.JwtOnly)] + [Authorize(Policy = AuthPolicy.JwtOnly, Roles = AuthRole.AdministratorOnly)] [ProducesResponseType(typeof(string), 200)] public IActionResult Debug() { @@ -100,7 +100,7 @@ namespace slskd.Core.API } [HttpGet] - [Authorize(Policy = AuthPolicy.JwtOnly)] + [Authorize(Policy = AuthPolicy.JwtOnly, Roles = AuthRole.AdministratorOnly)] [Route("yaml/location")] public IActionResult GetYamlFileLocation() { @@ -113,7 +113,7 @@ namespace slskd.Core.API } [HttpGet] - [Authorize(Policy = AuthPolicy.JwtOnly)] + [Authorize(Policy = AuthPolicy.JwtOnly, Roles = AuthRole.AdministratorOnly)] [Route("yaml")] public IActionResult GetYamlFile() { @@ -127,7 +127,7 @@ namespace slskd.Core.API } [HttpPost] - [Authorize(Policy = AuthPolicy.JwtOnly)] + [Authorize(Policy = AuthPolicy.JwtOnly, Roles = AuthRole.AdministratorOnly)] [Route("yaml")] public IActionResult UpdateYamlFile([FromBody] string yaml) { |
