mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Added CreateLocation using proper dn
This commit is contained in:
@@ -196,9 +196,15 @@ public async Task CreateAsset(LdapAttributeSet attributeSet)
|
||||
}
|
||||
|
||||
public async Task CreateLocation(LdapAttributeSet attributeSet)
|
||||
{
|
||||
await CreateObject(LocationsBaseDn, attributeSet);
|
||||
}
|
||||
{
|
||||
string? cn = attributeSet.GetAttribute("cn")?.StringValue;
|
||||
|
||||
if (string.IsNullOrEmpty(cn))
|
||||
throw new ArgumentException("AttributeSet must contain a cn attribute.");
|
||||
|
||||
string dn = PrependRDN($"cn={cn}", LocationsBaseDn);
|
||||
await CreateObject(dn, attributeSet);
|
||||
}
|
||||
|
||||
public async Task<UserAuthenticationResult> AuthenticateUser(string username, string password)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user