Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PPF-523 Deleting integration should block keycloak clients #1211

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

grubolsch
Copy link
Contributor

@grubolsch grubolsch commented Jun 18, 2024

Added

  • Deleting integration now blocks keycloak clients

Changed

BlockClients no longer fetches the integration but just uses the integration id.

  • It was not needed anyway, nothing except the id is used
  • It broke the delete integration flow because at that point the repository no longer finds the resource because it is deleted!

Ticket: https://jira.uitdatabank.be/browse/PPF-523

@grubolsch grubolsch marked this pull request as draft June 18, 2024 08:43
@grubolsch grubolsch marked this pull request as ready for review June 18, 2024 08:52
{
$integration = $this->integrationRepository->getById($integrationBlocked->id);
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI: it's fine like it is now, but there is a getByIdWithTrashed to get deleted integration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh, thank you for that info, but we also don't use anything from the integration except the id so fetching it doesn't have any added value.

private readonly KeycloakClientRepository $keycloakClientRepository,
private readonly ApiClient $client,
private readonly LoggerInterface $logger
) {
}

public function handle(IntegrationBlocked $integrationBlocked): void
public function handle(IntegrationBlocked|IntegrationDeleted $integrationBlocked): void
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe use a more generic name for the parameter?

@grubolsch grubolsch merged commit 2b988a3 into main Jun 18, 2024
8 checks passed
@grubolsch grubolsch deleted the PPF-523/delete-integration-block-keycloak-clients branch June 18, 2024 14:31
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