summaryrefslogtreecommitdiff
path: root/Services/SecurityService.cs
diff options
context:
space:
mode:
authorJake Mannens <jake@asger.xyz>2023-10-16 02:01:27 +1100
committerJake Mannens <jake@asger.xyz>2023-10-16 02:01:27 +1100
commit07728d1048f34e1d048da63684b341ab30bc1d06 (patch)
tree9c92b30be5f3cd060827edc2ff5836b6122a9cdd /Services/SecurityService.cs
parentea89ec0c1b05ac246f2ffd5907daace27564100b (diff)
FeedService and AclDialog
Diffstat (limited to 'Services/SecurityService.cs')
-rw-r--r--Services/SecurityService.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/Services/SecurityService.cs b/Services/SecurityService.cs
index 2d23a58..85513ec 100644
--- a/Services/SecurityService.cs
+++ b/Services/SecurityService.cs
@@ -80,15 +80,21 @@ public class SecurityService : ISecurityService {
if(wellKnownSid is not null)
return wellKnownSid;
- return sid.SddlForm;
+ return principalProvider.TranslateName(sid) ?? sid.SddlForm;
}
public SecurityIdentifier? TranslateName(string name) {
+ name = name.Trim().ToLower();
+
+ try {
+ return new SecurityIdentifier(name.ToUpper());
+ } catch(ArgumentException) {}
+
var wellKnownSid = WellKnownSid.TranslateName(name);
if(wellKnownSid is not null)
return wellKnownSid;
- throw new NotImplementedException();
+ return principalProvider.TranslateName(name);
}
public IEnumerable<HBObject> Filter(