Skip to content
This repository has been archived by the owner on Aug 20, 2021. It is now read-only.

Commit

Permalink
fix: Some users are wrongly flagged as primary owners
Browse files Browse the repository at this point in the history
  • Loading branch information
aelamrani authored and NicolasGeraud committed Mar 5, 2020
1 parent d0547b3 commit 3603584
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Expand Up @@ -452,6 +452,8 @@ public void archive(String applicationId) {
applicationRepository.update(application);
// remove notifications
genericNotificationConfigService.deleteReference(NotificationReferenceType.APPLICATION, applicationId);
// remove memberships
membershipRepository.deleteMembers(MembershipReferenceType.APPLICATION, applicationId);
// Audit
auditService.createApplicationAuditLog(
application.getId(),
Expand Down
Expand Up @@ -21,6 +21,7 @@
import io.gravitee.management.service.impl.ApplicationServiceImpl;
import io.gravitee.repository.exceptions.TechnicalException;
import io.gravitee.repository.management.api.ApplicationRepository;
import io.gravitee.repository.management.api.MembershipRepository;
import io.gravitee.repository.management.model.Application;
import io.gravitee.repository.management.model.ApplicationStatus;
import org.junit.Assert;
Expand Down Expand Up @@ -70,6 +71,8 @@ public class ApplicationService_ArchiveTest {
private AuditService auditService;
@Mock
private GenericNotificationConfigService genericNotificationConfigService;
@Mock
private MembershipRepository membershipRepository;

@Test
public void shouldArchive() throws TechnicalException {
Expand Down

0 comments on commit 3603584

Please sign in to comment.