summaryrefslogtreecommitdiff
path: root/LocalPrincipal.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2023-10-09 17:50:12 +1100
committerJake Mannens <jake@asger.xyz>2023-10-09 17:50:12 +1100
commitea89ec0c1b05ac246f2ffd5907daace27564100b (patch)
tree39d870b5167e0cab112a85dadcd8d8e67785b446 /LocalPrincipal.cs
parent36757ad31901cce4bb55f4911a28bb63ee1dee7a (diff)
parent299e58db28202be8706dee1c570c382e1489213b (diff)
Merge branch 'security' of gitlab.com:plasmicplexus/HyperBooru-Server into security
Diffstat (limited to 'LocalPrincipal.cs')
-rw-r--r--LocalPrincipal.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/LocalPrincipal.cs b/LocalPrincipal.cs
index 35ff310..f4b9981 100644
--- a/LocalPrincipal.cs
+++ b/LocalPrincipal.cs
@@ -11,6 +11,17 @@ public class LocalPrincipal : IPrincipal {
public string Name { get; set; }
public SecurityIdentifier Sid { get; set; }
public List<LocalGroup> MemberOf { get; set; }
+
+ // At this time, DisplayName is bound to Name, as local
+ // users are currently expected to be identified by username
+ // only. This is a quick 'n' dirty hack that works for
+ // displaying the user's name consistently, but may lead to
+ // unexpected behaviour in future when setting the DisplayName
+ // property if that ever becomes possible.
+ public string DisplayName {
+ get => Name;
+ set => Name = value;
+ }
}
public class LocalUser : LocalPrincipal, IUser {