mirror of
https://github.com/LD-Reborn/Berufsschule_HAM.git
synced 2025-12-20 06:51:55 +00:00
Added filter to /Users/Index to filter out fields
This commit is contained in:
@@ -55,11 +55,21 @@ public class LdapService : IDisposable
|
||||
return await ListObjectBy(UsersBaseDn, "", ["cn", "sn", "title", "uid", "jpegPhoto", "userPassword", "description"]);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Dictionary<string, string>>> ListUsersAsync(string[] attributes)
|
||||
{
|
||||
return await ListObjectBy(UsersBaseDn, "", attributes);
|
||||
}
|
||||
|
||||
public async Task<Dictionary<string, string>> GetUserByUidAsync(string uid)
|
||||
{
|
||||
return (await ListObjectBy(UsersBaseDn, $"uid={uid}", ["cn", "sn", "title", "uid", "jpegPhoto", "userPassword", "description"])).First();
|
||||
}
|
||||
|
||||
public async Task<Dictionary<string, string>> GetUserByUidAsync(string uid, string[] attributes)
|
||||
{
|
||||
return (await ListObjectBy(UsersBaseDn, $"uid={uid}", attributes)).First();
|
||||
}
|
||||
|
||||
|
||||
public async Task<IEnumerable<Dictionary<string, string>>> ListDeviceAsync()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user