Skip to content

Commit 4c20ab8

Browse files
authored
Merge pull request #1881 from atmire/fix-1879
Fix issue when deleting a member from a group
2 parents 417c4de + c55c15b commit 4c20ab8

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

src/app/access-control/group-registry/group-form/members-list/members-list.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ export class MembersListComponent implements OnInit, OnDestroy {
209209
if (activeGroup != null) {
210210
const response = this.groupDataService.deleteMemberFromGroup(activeGroup, ePerson.eperson);
211211
this.showNotifications('deleteMember', response, ePerson.eperson.name, activeGroup);
212-
this.search({ scope: this.currentSearchScope, query: this.currentSearchQuery });
213212
} else {
214213
this.notificationsService.error(this.translateService.get(this.messagePrefix + '.notification.failure.noActiveGroup'));
215214
}
@@ -315,7 +314,6 @@ export class MembersListComponent implements OnInit, OnDestroy {
315314
response.pipe(getFirstCompletedRemoteData()).subscribe((rd: RemoteData<any>) => {
316315
if (rd.hasSucceeded) {
317316
this.notificationsService.success(this.translateService.get(this.messagePrefix + '.notification.success.' + messageSuffix, { name: nameObject }));
318-
this.ePersonDataService.clearLinkRequests(activeGroup._links.epersons.href);
319317
} else {
320318
this.notificationsService.error(this.translateService.get(this.messagePrefix + '.notification.failure.' + messageSuffix, { name: nameObject }));
321319
}

src/app/core/eperson/group-data.service.spec.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ describe('GroupDataService', () => {
191191
callback();
192192

193193
expect(objectCache.getByHref).toHaveBeenCalledWith(EPersonMock2._links.self.href);
194-
expect(objectCache.getByHref).toHaveBeenCalledWith(GroupMock._links.self.href);
195-
expect(requestService.setStaleByUUID).toHaveBeenCalledTimes(4);
196-
expect(requestService.setStaleByUUID).toHaveBeenCalledWith('request1');
194+
expect(requestService.setStaleByUUID).toHaveBeenCalledTimes(2);
197195
expect(requestService.setStaleByUUID).toHaveBeenCalledWith('request2');
198196
});
199197
});
@@ -218,9 +216,7 @@ describe('GroupDataService', () => {
218216
callback();
219217

220218
expect(objectCache.getByHref).toHaveBeenCalledWith(EPersonMock._links.self.href);
221-
expect(objectCache.getByHref).toHaveBeenCalledWith(GroupMock._links.self.href);
222-
expect(requestService.setStaleByUUID).toHaveBeenCalledTimes(4);
223-
expect(requestService.setStaleByUUID).toHaveBeenCalledWith('request1');
219+
expect(requestService.setStaleByUUID).toHaveBeenCalledTimes(2);
224220
expect(requestService.setStaleByUUID).toHaveBeenCalledWith('request2');
225221
});
226222
});

src/app/core/eperson/group-data.service.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ export class GroupDataService extends IdentifiableDataService<Group> implements
179179

180180
return this.rdbService.buildFromRequestUUIDAndAwait(requestId, () => observableZip(
181181
this.invalidateByHref(ePerson._links.self.href),
182-
this.invalidateByHref(activeGroup._links.self.href),
183182
this.requestService.setStaleByHrefSubstring(ePerson._links.groups.href).pipe(take(1)),
184183
this.requestService.setStaleByHrefSubstring(activeGroup._links.epersons.href).pipe(take(1)),
185184
));
@@ -198,7 +197,6 @@ export class GroupDataService extends IdentifiableDataService<Group> implements
198197

199198
return this.rdbService.buildFromRequestUUIDAndAwait(requestId, () => observableZip(
200199
this.invalidateByHref(ePerson._links.self.href),
201-
this.invalidateByHref(activeGroup._links.self.href),
202200
this.requestService.setStaleByHrefSubstring(ePerson._links.groups.href).pipe(take(1)),
203201
this.requestService.setStaleByHrefSubstring(activeGroup._links.epersons.href).pipe(take(1)),
204202
));

0 commit comments

Comments
 (0)