Implementierung des Imports von Benutzern und Gruppen aus Active Directory im Angular-Frontend.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { Injectable, Inject } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { HttpClient, HttpParams } from '@angular/common/http';
|
||||
import { DirUser } from '../models/user-management.api.models';
|
||||
import { ApiService } from './user-management.api.service';
|
||||
import { Observable } from 'rxjs/internal/Observable';
|
||||
import { ApiResponseModel } from '../models/api.response.model';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@@ -10,4 +12,13 @@ export class DirUserService extends ApiService<DirUser> {
|
||||
constructor(http: HttpClient, @Inject('DIR_USER_URL') private userUri: string) {
|
||||
super(http, userUri);
|
||||
}
|
||||
|
||||
override getAll(groupName?: string): Observable<ApiResponseModel<DirUser[]>> {
|
||||
let params = new HttpParams();
|
||||
if (groupName) {
|
||||
params = params.set('groupName', groupName);
|
||||
}
|
||||
|
||||
return this.http.get<ApiResponseModel<DirUser[]>>(this.baseUrl, { params });
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user