summaryrefslogtreecommitdiff
path: root/Services/PrincipalProvider.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Services/PrincipalProvider.cs')
-rw-r--r--Services/PrincipalProvider.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Services/PrincipalProvider.cs b/Services/PrincipalProvider.cs
index 4b2cf42..7039379 100644
--- a/Services/PrincipalProvider.cs
+++ b/Services/PrincipalProvider.cs
@@ -5,6 +5,9 @@ public interface IPrincipalProvider {
public IUser? GetUser(string name);
public IGroup? GetGroup(string name);
+ public SecurityIdentifier? TranslateName(string name);
+ public string? TranslateName(SecurityIdentifier sid);
+
/// <summary>
/// Perform a search for any principals whose account name
/// matches the search term specified by <c>name</c>.
@@ -29,13 +32,15 @@ public abstract class PrincipalProvider : IPrincipalProvider {
public abstract IUser? GetUser(string name);
public abstract IGroup? GetGroup(string name);
+ public abstract SecurityIdentifier? TranslateName(string name);
+ public abstract string? TranslateName(SecurityIdentifier sid);
+
public abstract IPrincipal[]? SearchPrincipals(string name);
public IGroup[] GetGroups(IPrincipal principal) =>
GetGroups(principal.Sid, false);
public IGroup[] GetGroups(IPrincipal principal, bool recurse) =>
GetGroups(principal.Sid, recurse);
-
public IGroup[] GetGroups(SecurityIdentifier sid) => GetGroups(sid, false);
public abstract IGroup[] GetGroups(SecurityIdentifier sid, bool recurse);