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

Fix user approval workflow #1621

Merged
merged 2 commits into from
Jun 15, 2023
Merged

Fix user approval workflow #1621

merged 2 commits into from
Jun 15, 2023

Conversation

waxlamp
Copy link
Member

@waxlamp waxlamp commented Jun 14, 2023

The user approval form handler was relying on "active" being the default state for a Django user, and therefore users who were approved after being rejected retained their "inactive" status. This PR fixes that by explicitly setting users to active whenever they are approved.

Closes #1619.

This is meant to fix a bug in which a user is first rejected, then later
approved. In that use case, the user's active flag remains `False` from
the rejection and is never set to `True` during the subsequent approval.
Copy link
Member

@mvandenburgh mvandenburgh left a comment

Choose a reason for hiding this comment

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

LGTM. I noticed some other issues with this endpoint that may also be causing problems - they are likely out of scope for this PR so I filed an issue #1623

@yarikoptic
Copy link
Member

is there any way to figure out all possibly effected users since may be there were some others who just gave up and didn't complain last the last one?

@mvandenburgh
Copy link
Member

is there any way to figure out all possibly effected users since may be there were some others who just gave up and didn't complain last the last one?

Yes, it appears there are some other users in this situation - I'll share them privately

@waxlamp waxlamp merged commit 79296b2 into master Jun 15, 2023
@waxlamp waxlamp deleted the fix-user-approval-workflow branch June 15, 2023 17:34
@dandibot
Copy link
Member

🚀 PR was released in v0.3.43 🚀

@dandibot dandibot added the released This issue/pull request has been released. label Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dashboard/user/ says approved but DB doesn't have "Active"
4 participants