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

added event for creating a user #54

Closed
wants to merge 1 commit into from

Conversation

Arkusm
Copy link

@Arkusm Arkusm commented May 3, 2024

explained in #53

@mamico mamico self-requested a review May 5, 2024 07:27
Copy link
Collaborator

@mamico mamico left a comment

Choose a reason for hiding this comment

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

LGTM

@mamico mamico requested a review from erral May 5, 2024 07:28
@@ -215,6 +217,8 @@ def rememberIdentity(self, userinfo):
# https://bandit.readthedocs.io/en/1.7.4/plugins/b110_try_except_pass.html
pass
self._updateUserProperties(user, userinfo)
if user is not None:
notify(PrincipalCreated(user))
Copy link
Member

@erral erral May 6, 2024

Choose a reason for hiding this comment

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

Is notifying this enough? For instance, when a user logs in a Plone site and Plone fires portal_membership's loginUser, this tool notifies either UserInitialLoginEvent or UserLoggedInEvent.

see: https://github.com/plone/Products.PlonePAS/blob/master/src/Products/PlonePAS/tools/membership.py#L657-L660

I think that we should be notifying those two events too.

Copy link
Author

Choose a reason for hiding this comment

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

If I see it correctly, it can also happen that member properties have to be updated with every new login. From this point of view, it definitely makes sense to notifying more events.

Copy link
Member

Choose a reason for hiding this comment

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

Nice catch indeed.

@ericof
Copy link
Member

ericof commented Jun 25, 2024

As this PR seems stale, and @steffenri has a deadline to respect, I created a new PR #58 including the implementation here and the additional events requested by @erral

@ericof ericof closed this Jun 25, 2024
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.

4 participants