aboutsummaryrefslogtreecommitdiffstats
path: root/src/slskd/Core
diff options
context:
space:
mode:
authorJP Dillingham <jp@dillingham.me>2022-10-30 15:18:31 -0500
committerJP Dillingham <jp@dillingham.me>2022-10-30 15:18:31 -0500
commit8d1ae7b3357cc7d10b86940d98b22d072bbdbe8c (patch)
tree06477bebf42eadf04da742123138e6b733486310 /src/slskd/Core
parentdb830fba26dbef2720a786c88ec30fc1df4fc714 (diff)
downloadslskd-8d1ae7b3357cc7d10b86940d98b22d072bbdbe8c.tar.gz
add Role to API key options
Diffstat (limited to 'src/slskd/Core')
-rw-r--r--src/slskd/Core/Options.cs8
1 files changed, 8 insertions, 0 deletions
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;
@@ -1424,6 +1425,13 @@ namespace slskd
public string Key { get; init; }
/// <summary>
+ /// Gets the role for the key.
+ /// </summary>
+ [Description("user role for the key; readonly, readwrite, administrator")]
+ [Enum(typeof(Role))]
+ public string Role { get; init; } = slskd.Authentication.Role.ReadOnly.ToString();
+
+ /// <summary>
/// Gets the comma separated list of CIDRs that are authorized to use the key.
/// </summary>
[Description("An optional comma separated list of CIDRs that are authorized to use the key")]