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

Extract user deletion into a new service #919

Merged
merged 3 commits into from
Sep 1, 2023

Conversation

mxr576
Copy link
Contributor

@mxr576 mxr576 commented Aug 28, 2023

Introduce a programming API for downstream developers that allows customizing what should happen when a user is deleted in Drupal.

Co-authored-by: @FCsongradi

Closes #915

@mxr576 mxr576 marked this pull request as draft August 28, 2023 06:47
@mxr576 mxr576 marked this pull request as ready for review August 28, 2023 09:32
@mxr576
Copy link
Contributor Author

mxr576 commented Aug 30, 2023

Just spotted apigee_edge_teams_user_delete() :O so that should be also moved to use the new API.

cc @FCsongradi

FCsongradi and others added 2 commits August 30, 2023 11:14
Introduce a programming API for downstream developers that allows
customizing what should happen when a user is deleted in Drupal.

Co-authored-by: Dezső BICZÓ <[email protected]>
*/
interface UserRemovalHandlerInterface {
interface PostUserDeleteActionPerformerInterface {
Copy link
Contributor Author

@mxr576 mxr576 Aug 30, 2023

Choose a reason for hiding this comment

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

Is is better? I mean, naming is hard... but I think it is better to be explicit and descriptive in names (in domain driven style) when designing public APIs. If we like this I can squash this change to other commits.

* {@inheritdoc}
*/
public function __invoke(UserInterface $account): void {
($this->decorated)($account);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Double checked and this was the original order as well, the hook in apigee_edge was called sooner than in this module - which makes total sense.

Copy link
Collaborator

@shishir-intelli shishir-intelli left a comment

Choose a reason for hiding this comment

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

Checked for Apigee Edge and X both.
LGTM

@shishir-intelli shishir-intelli merged commit a7b3ef7 into apigee:3.x Sep 1, 2023
mxr576 added a commit to FCsongradi/apigee-edge-drupal that referenced this pull request Sep 1, 2023
* Extract user deletion into a new service

Introduce a programming API for downstream developers that allows
customizing what should happen when a user is deleted in Drupal.

Co-authored-by: Dezső BICZÓ <[email protected]>

* Leverage the new user removal handler API for cascade deleting team roles

* Better naming for the new API and implementations

---------

Co-authored-by: ferenc.csongradi <[email protected]>
shishir-intelli pushed a commit that referenced this pull request Sep 4, 2023
* Extract user deletion into a new service

Introduce a programming API for downstream developers that allows
customizing what should happen when a user is deleted in Drupal.



* Leverage the new user removal handler API for cascade deleting team roles

* Better naming for the new API and implementations

---------

Co-authored-by: Dezső BICZÓ <[email protected]>
@shishir-intelli shishir-intelli added the enhancement New feature or request label Sep 4, 2023
@shishir-intelli shishir-intelli added this to the 3.0.2 milestone Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

Successfully merging this pull request may close these issues.

Provide a programming API for opting out/fine tuning developer removal on user removal
3 participants