Skip to content

Ignore reset-password auto-enroll when mail is disabled - #7585

Open
xhon-pelushi wants to merge 1 commit into
dani-garcia:mainfrom
xhon-pelushi:fix/reset-password-policy-requires-mail
Open

Ignore reset-password auto-enroll when mail is disabled#7585
xhon-pelushi wants to merge 1 commit into
dani-garcia:mainfrom
xhon-pelushi:fix/reset-password-policy-requires-mail

Conversation

@xhon-pelushi

Copy link
Copy Markdown

Summary

  • Make OrgPolicy::org_is_reset_password_auto_enroll return false when mail/SMTP is disabled.
  • Invite/accept and enrollment paths that rely on auto-enroll no longer require a reset-password key on email-disabled instances.
  • Aligns with check_reset_password_applicable, which already rejects password reset when mail is off.

Fixes #7459

Test plan

  • cargo check --profile ci --features sqlite
  • With SMTP enabled and Account Recovery auto-enroll on, invite/accept still requires enrollment when configured.
  • Disable SMTP afterward; invite/register a new org user without a reset-password key and confirm it succeeds.
  • With SMTP still disabled, password-reset admin actions remain unavailable as before.

Account recovery requires SMTP. When mail is off, treat the organization
reset-password auto-enroll policy as inactive so invite/accept flows are
not forced to supply a reset-password key.

Fixes dani-garcia#7459
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.

Account Recovery Administration policy is not disabled when SMTP is disabled leading to registration errors

1 participant