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

Manual email confirm #2492

Merged
merged 7 commits into from Dec 11, 2022
Merged

Manual email confirm #2492

merged 7 commits into from Dec 11, 2022

Conversation

jaschaurbach
Copy link
Member

@jaschaurbach jaschaurbach commented Dec 11, 2022

This one ads bw-dev manual_confirm $USER and manage.py manual-confirm $USER to manually confirm E-Mail of a user activate the user.

Autocompletion for shell added for this as well as for remove_2fa (we forgot that one)

./bw-dev confirm_email USER
(venv) python manage.py confirm_email USER
The lione was not LONG ENOUGH.
@mouse-reeve
Copy link
Member

This is good to have! I think it should also be doable from the UI directly

@jaschaurbach
Copy link
Member Author

This is good to have! I think it should also be doable from the UI directly

Working on that - just finding out where to put it best and how it should look like. But I need it desperately as my mailserver had some strange behavior and mails never delivered. As I am running the main-branch on this server it would be great if this can be merged - I will then add the UI-part later in another pull request :)

@mouse-reeve
Copy link
Member

Thank you! I meant that more as a general note rather than "jascha please do this" but I really appreciate that. I also wrote an admin page that lets you send a test email, I'll open a PR for it shortly.

Copy link
Member

@mouse-reeve mouse-reeve left a comment

Choose a reason for hiding this comment

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

Besides my comment below this looks perfect

bookwyrm/management/commands/confirm_email.py Outdated Show resolved Hide resolved
@jaschaurbach
Copy link
Member Author

merged 2498 to use user.reactivat() - did not work?

I nulled deactivation_reason now.

@mouse-reeve
Copy link
Member

The change in that PR wasn't directly related to this, I just realized I should be using reactivate() there as well -- I think I just made the comment more confusing with that!

What I was trying to say is that rather than manually setting is_active and deactivation_reason in the management command, you can just call user.reactivate() and it will handle updating and saving the user.

Copy link
Member

@mouse-reeve mouse-reeve left a comment

Choose a reason for hiding this comment

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

Perfect! Thank you

@mouse-reeve mouse-reeve merged commit ea31662 into bookwyrm-social:main Dec 11, 2022
@jaschaurbach jaschaurbach deleted the manual-emial-confirm branch December 11, 2022 20:43
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.

None yet

2 participants