From 360e1c33739166b35f58f82acc8a9475cf8271a1 Mon Sep 17 00:00:00 2001 From: JP Dillingham Date: Sun, 7 Jun 2026 15:22:09 -0500 Subject: fully deprecate old permissions objects --- src/slskd/Core/Options.cs | 51 ----------------------------------------------- 1 file changed, 51 deletions(-) (limited to 'src') diff --git a/src/slskd/Core/Options.cs b/src/slskd/Core/Options.cs index f35a56df..d1062a2c 100644 --- a/src/slskd/Core/Options.cs +++ b/src/slskd/Core/Options.cs @@ -705,57 +705,6 @@ namespace slskd } } - /// - /// Permission options. - /// - public class PermissionsOptions - { - /// - /// Gets file permission options. - /// - [Validate] - public FileOptions File { get; init; } = new FileOptions(); - - /// - /// File permission options. - /// - public class FileOptions : IValidatableObject - { - /// - /// Gets the permissions to apply to newly created files. - /// - /// - /// Applicable to non-Windows operating systems, only. - /// - [Argument(default, "file-permission-mode")] - [EnvironmentVariable("FILE_PERMISSION_MODE")] - [Description("the permissions to apply to newly created files (chmod syntax, non-Windows only)")] - public string Mode { get; init; } - - /// - /// Extended validation. - /// - /// - /// - public IEnumerable Validate(ValidationContext validationContext) - { - var results = new List(); - - if (!string.IsNullOrEmpty(Mode)) - { - var regEx = new Regex("^[0-7]{3,4}$", RegexOptions.Compiled); - - if (!regEx.IsMatch(Mode)) - { - results.Add(new ValidationResult($"Field {nameof(Mode)} is invalid. Specify a three- or four-character string consisting of only 0-7 (chmod syntax, [0]000-[7]777, inclusive)")); - } - } - - return results; - } - } - } - /// /// Directory options. /// -- cgit v1.2.3