Skip to content

feat: delete pending application invitations#17334

Open
jaroslawlakomy-grav wants to merge 2 commits into
masterfrom
APIM-14239-Backend-Implement-Invitation-Delete
Open

feat: delete pending application invitations#17334
jaroslawlakomy-grav wants to merge 2 commits into
masterfrom
APIM-14239-Backend-Implement-Invitation-Delete

Conversation

@jaroslawlakomy-grav
Copy link
Copy Markdown
Contributor

Issue

https://gravitee.atlassian.net/browse/APIM-14239

Description

Implements the first part of invitation mutations: deleting pending application invitations from the Developer Portal.
Changes:

  • Adds DELETE /applications/{applicationId}/invitations/{invitationId},
  • Adds DeleteApplicationInvitationUseCase and domain service for application-scoped deletion,
  • Validates that the application exists in the current environment before deleting.
  • Ensures the invitation exists and belongs to the requested application.
  • Returns 404 when the application, invitation, or application/invitation relation is invalid.
  • Extends invitation CRUD service with application invitation lookup by ID.

Out of scope

  • Invitation role update.
  • Resend invitation.
  • Notification handling.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the capability to delete application invitations by adding a new DELETE endpoint (/{invitationId}) to ApplicationInvitationsResource. This endpoint is supported by a new use case (DeleteApplicationInvitationUseCase) and domain service (DeleteApplicationInvitationDomainService) that validate the application's existence and ensure the invitation belongs to the specified application before deletion. The changes also include the necessary repository query methods in InvitationCrudService and its implementations, as well as comprehensive unit tests for the resource, use case, and domain service. There are no review comments to address, and the implementation is clean and well-tested, so I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@jaroslawlakomy-grav jaroslawlakomy-grav marked this pull request as ready for review June 2, 2026 09:53
@jaroslawlakomy-grav jaroslawlakomy-grav requested a review from a team as a code owner June 2, 2026 09:53
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 2, 2026


public class ApplicationInvitationNotFoundException extends NotFoundDomainException {

public ApplicationInvitationNotFoundException(String invitationId) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about passing InvitationId instead of String?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants