Skip to content

fix(user): allow GitHub-only accounts to edit profile without a password#1807

Open
miaulalala wants to merge 1 commit into
masterfrom
fix/github-account-password-required
Open

fix(user): allow GitHub-only accounts to edit profile without a password#1807
miaulalala wants to merge 1 commit into
masterfrom
fix/github-account-password-required

Conversation

@miaulalala

Copy link
Copy Markdown
Contributor

Summary

  • AccountForm unconditionally required a confirmation password when changing name/email/subscribe_to_news, but accounts created via GitHub OAuth have no usable password to confirm — so those edits always failed with "Password is required to change these fields."
  • Fixed by checking has_usable_password() before requiring/validating the confirmation password. This is more general than special-casing the github provider (mirrors the approach DeleteAccountForm already uses for GitHub, but covers any social-only login).

Test plan

  • Added GitHubOnlyAccountEditTest covering name and email changes for a GitHub-only (no usable password) account
  • poetry run python manage.py test nextcloudappstore.user.tests --settings nextcloudappstore.settings.development — all 15 tests pass

🤖 Generated with Claude Code

AccountForm unconditionally required a confirmation password when
changing name/email, but accounts created via GitHub OAuth have no
usable password to confirm, so those edits always failed. Skip the
password requirement/check when the account has no usable password.

Signed-off-by: Anna Larch <anna@nextcloud.com>
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.

1 participant