diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-10-06 08:41:00 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-06 08:41:00 -0500 |
| commit | fb6350e107bd5f850a13c8c2065e341241967ab2 (patch) | |
| tree | 73e1aaa9e197df71f28accec82121581774a1aad /src/slskd/Core/API/Controllers/OptionsController.cs | |
| parent | b879d7109ccde713b17258dc6d1e89624fdb6603 (diff) | |
| parent | 55db59a4ef022befd503cee7247e5f4f5e403ef8 (diff) | |
| download | slskd-fb6350e107bd5f850a13c8c2065e341241967ab2.tar.gz | |
Merge pull request #681 from slskd/fix-auth
Add authorization policies
Diffstat (limited to 'src/slskd/Core/API/Controllers/OptionsController.cs')
| -rw-r--r-- | src/slskd/Core/API/Controllers/OptionsController.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/slskd/Core/API/Controllers/OptionsController.cs b/src/slskd/Core/API/Controllers/OptionsController.cs index b0856ed3..f621b37a 100644 --- a/src/slskd/Core/API/Controllers/OptionsController.cs +++ b/src/slskd/Core/API/Controllers/OptionsController.cs @@ -56,7 +56,7 @@ namespace slskd.Core.API /// </summary> /// <returns></returns> [HttpGet] - [Authorize] + [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(typeof(Options), 200)] public IActionResult Current() { @@ -69,7 +69,7 @@ namespace slskd.Core.API /// <returns></returns> [HttpGet] [Route("startup")] - [Authorize] + [Authorize(Policy = AuthPolicy.Any)] [ProducesResponseType(typeof(Options), 200)] public IActionResult Startup() { @@ -82,7 +82,7 @@ namespace slskd.Core.API /// <returns></returns> [HttpGet] [Route("debug")] - [Authorize] + [Authorize(Policy = AuthPolicy.JwtOnly)] [ProducesResponseType(typeof(string), 200)] public IActionResult Debug() { @@ -95,7 +95,7 @@ namespace slskd.Core.API } [HttpGet] - [Authorize] + [Authorize(Policy = AuthPolicy.JwtOnly)] [Route("yaml/location")] public IActionResult GetYamlFileLocation() { @@ -103,7 +103,7 @@ namespace slskd.Core.API } [HttpGet] - [Authorize] + [Authorize(Policy = AuthPolicy.JwtOnly)] [Route("yaml")] public IActionResult GetYamlFile() { @@ -117,7 +117,7 @@ namespace slskd.Core.API } [HttpPost] - [Authorize] + [Authorize(Policy = AuthPolicy.JwtOnly)] [Route("yaml")] public IActionResult UpdateYamlFile([FromBody] string yaml) { @@ -144,7 +144,7 @@ namespace slskd.Core.API } [HttpPost] - [Authorize] + [Authorize(Policy = AuthPolicy.Any)] [Route("yaml/validate")] public IActionResult ValidateYamlFile([FromBody] string yaml) { |
