From 8d1ae7b3357cc7d10b86940d98b22d072bbdbe8c Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 30 Oct 2022 15:18:31 -0500 Subject: add Role to API key options --- src/slskd/Core/Options.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index 765ba6e9..a1591923 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -29,6 +29,7 @@ namespace slskd using System.Text.RegularExpressions; using FluentFTP; using NetTools; + using slskd.Authentication; using slskd.Configuration; using slskd.Cryptography; using slskd.Network; @@ -1423,6 +1424,13 @@ namespace slskd [Secret] public string Key { get; init; } + /// + /// Gets the role for the key. + /// + [Description("user role for the key; readonly, readwrite, administrator")] + [Enum(typeof(Role))] + public string Role { get; init; } = slskd.Authentication.Role.ReadOnly.ToString(); + /// /// Gets the comma separated list of CIDRs that are authorized to use the key. /// -- cgit v1.2.3