user service updates
This commit is contained in:
parent
f75565e38b
commit
2875f60936
@ -154,7 +154,7 @@ export class UserControllerService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the users who contain redaction roles.
|
||||
* Deletes given user
|
||||
* None
|
||||
* @param userId userId
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
@ -194,6 +194,55 @@ export class UserControllerService {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes given users
|
||||
* None
|
||||
* @param userId userId
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public deleteUsers(userId: Array<string>, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
public deleteUsers(userId: Array<string>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
public deleteUsers(userId: Array<string>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
public deleteUsers(userId: Array<string>, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (userId === null || userId === undefined) {
|
||||
throw new Error('Required parameter userId was null or undefined when calling deleteUser1.');
|
||||
}
|
||||
|
||||
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
|
||||
if (userId) {
|
||||
userId.forEach((element) => {
|
||||
queryParameters = queryParameters.append('userId', <any>element);
|
||||
});
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [];
|
||||
|
||||
return this.httpClient.request<any>('delete', `${this.basePath}/user`, {
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the users in realm with information of roles.
|
||||
* None
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user