mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
CRUD - Assets create
This commit is contained in:
@@ -175,10 +175,16 @@ public partial class LdapService : IDisposable
|
||||
await CreateObject(dn, attributeSet);
|
||||
}
|
||||
|
||||
public async Task CreateAsset(LdapAttributeSet attributeSet)
|
||||
{
|
||||
await CreateObject(AssetsBaseDn, attributeSet);
|
||||
}
|
||||
public async Task CreateAsset(LdapAttributeSet 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}", AssetsBaseDn);
|
||||
await CreateObject(dn, attributeSet);
|
||||
}
|
||||
|
||||
public async Task CreateLocation(LdapAttributeSet attributeSet)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user