Skip to content

Commit

Permalink
Add force parameter for removeUserFromGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
Heiner Pöpping committed Jul 22, 2024
1 parent 595b852 commit fdcf5a3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/UacServiceClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -695,21 +695,24 @@ class UacServiceClient<T extends UacServiceClientOptions> {
* @param groupId
* @param siteId
* @param ignoreConflict
* @param force whether to force remove user from known users even if still in any paid uac group
*/
async removeUserFromGroup({
personId,
groupId,
siteId,
ignoreConflict
ignoreConflict,
force = false,
}: RemoveSiteId<T, {
groupId: number;
siteId: string;
personId: string;
ignoreConflict: boolean;
force?: boolean;
}>): Promise<{ success: boolean, expirationTime: string | undefined }> { // TODO: why is here no exception?
try {
const queryPersonId = personId || (this.getDefaultPersonId && this.getDefaultPersonId());
const response = await this.logFetch(`UserGroup/${groupId.toString()}/Users/${queryPersonId}`, {
const response = await this.logFetch(`UserGroup/${groupId.toString()}/Users/${queryPersonId}?force=${force}`, {
method: 'DELETE'
}, {
siteId,
Expand Down

0 comments on commit fdcf5a3

Please sign in to comment.