Skip to content

fix: ENT-11771 SAML login - Allow email editing if emtpy#255

Merged
jono-booth merged 1 commit into
release-ulmofrom
feat/saml-disable-email-editing-2
Apr 29, 2026
Merged

fix: ENT-11771 SAML login - Allow email editing if emtpy#255
jono-booth merged 1 commit into
release-ulmofrom
feat/saml-disable-email-editing-2

Conversation

@jono-booth
Copy link
Copy Markdown

Small follow up to make email editable if blank.
ENT-11771

Copilot AI review requested due to automatic review settings April 29, 2026 12:03
@jono-booth jono-booth force-pushed the feat/saml-disable-email-editing-2 branch from c81396e to 151f0d5 Compare April 29, 2026 12:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts SAML SSO registration behavior so that disable_email_editing=True only makes the email field read-only when the SAML pipeline actually provides a non-empty email value—allowing users to enter an email when the IdP doesn’t supply one.

Changes:

  • Gate the “email readonly” override behind the presence of a non-empty email value from get_register_form_data.
  • Add a regression test ensuring the email field remains editable when no email is provided by the pipeline (even if disable_email_editing=True).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
openedx/core/djangoapps/user_authn/views/registration_form.py Only applies the email readonly restriction when the provider-supplied email is non-empty.
openedx/core/djangoapps/user_authn/views/tests/test_saml_disable_email_editing.py Adds coverage for the “disable editing but missing email” scenario to prevent regressions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jono-booth jono-booth force-pushed the feat/saml-disable-email-editing-2 branch from 151f0d5 to 6b0d539 Compare April 29, 2026 12:11
@jono-booth jono-booth enabled auto-merge April 29, 2026 12:25
@jono-booth jono-booth merged commit 3deac8f into release-ulmo Apr 29, 2026
63 checks passed
@jono-booth jono-booth deleted the feat/saml-disable-email-editing-2 branch April 29, 2026 12:35
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.

3 participants