Skip to content

Fix Privacy Settings Password Required Template & Wire In Florence SSO To Privacy Settings#575

Draft
sanjeevz3009 wants to merge 4 commits intomainfrom
chore/privacy-sso-auth-template-improvements
Draft

Fix Privacy Settings Password Required Template & Wire In Florence SSO To Privacy Settings#575
sanjeevz3009 wants to merge 4 commits intomainfrom
chore/privacy-sso-auth-template-improvements

Conversation

@sanjeevz3009
Copy link
Copy Markdown
Contributor

@sanjeevz3009 sanjeevz3009 commented Apr 9, 2026

What is the context of this PR?

This PR is a initative taken after reviewing #568 where I uncovered the below issues, which this PR aims to address.

This PR addresses several issues:

  • First one being, currently when a user sets a page behind a password protection using the page privacy setting -> when the user visits the live URL -> 404. -> when it's meant to show the password_required.html template. We have missed this during the NonTrailingSlashRedirectMiddleware work.
  • I have also improved the UI/ UX for the password_required.html template and how it surfaces the error to the user etc.
    • This has been fixed on this PR, and the front-end template has been improved.
  • The second enhancement is around when we use the privacy settings to have a page behind Private, accessible to any logged-in users or Private, accessible to users in specific groups options, then we render the login_page.html template, and the logic behind it would not work due to WAGTAIL_CORE_ADMIN_LOGIN_ENABLED=False/ Wagtail core login being turned off in the deployed environments. + This template UI design/ UX needs improving.
    • I have fixed the core issue where, when users use the options to have a page behind a login wall, such as a user must be logged in or logged in and be part of a certain group -> then it will redirect the user to the Florence SSO page, and the user can be authenticated using that.

How to review

  • Read the following doc: https://docs.wagtail.org/en/stable/advanced_topics/privacy.html
  • Make sure the above issues are resolved:
    • No 404 when visiting a page that's password-protected
    • When Congito is enabled, you can successfully log in and view a page behind Private, accessible to any logged-in users or Private, accessible to users in specific groups page privacy options. To do this, you will need to use the dis-authentication-stub locally to try to simulate the SSO user journey/ flow. See the PR description on how: feat(auth): add AWS Cognito JWT authentication support #163
  • Play around with the password_required.html template form features and make sure the errors are surfaced properly now to the user.

Deployment Safety

Bleed and Sandbox deploy automatically on merge, so PRs should be safe to deploy immediately.

Please select one:

  • Safe to auto-deploy
  • Not safe to auto-deploy

Follow-up Actions

List any follow-up actions (if applicable), like needed documentation updates or additional testing.

@sanjeevz3009 sanjeevz3009 added Bug Fix Something isn't working Enhancement Enhance the functionality of existing features. do not merge status: Needs tests status: In-progress component: Auth On Hold ✋ Pull request is currently deprioritised and on hold, but not blocked labels Apr 9, 2026
Comment thread cms/auth/views.py Fixed
@sanjeevz3009 sanjeevz3009 removed status: In-progress On Hold ✋ Pull request is currently deprioritised and on hold, but not blocked labels Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Fix Something isn't working component: Auth do not merge Enhancement Enhance the functionality of existing features. status: Needs tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants