CMS-859 Disable page privacy settings for CMS users#568
Conversation
AWitcherONS
left a comment
There was a problem hiding this comment.
Unit tests pass
page privacy not seen
Co-authored-by: Sanjeev Srithevan <41544303+sanjeevz3009@users.noreply.github.com>
MaciekBaron
left a comment
There was a problem hiding this comment.
LGTM
Question: Should we consider adding a migration removing any existing restrictions, for cleanup purposes?
@MaciekBaron @AdamHawtin It's mentioned in the JIRA card: Maybe it needs a separate card as a follow-up? If so good to have a card created and chucked into the backlog. |
sanjeevz3009
left a comment
There was a problem hiding this comment.
Tested it against all page types. Works well. LGTM!
Good point, I've added a migration in d1da0aa. |
MebinAbraham
left a comment
There was a problem hiding this comment.
Other than Sanjeev's comment. 👍
…s.py Co-authored-by: Sanjeev Srithevan <41544303+sanjeevz3009@users.noreply.github.com>
What is the context of this PR?
We need to disable Wagtail's page privacy features. This PR achieves this by overriding the
can_set_view_restrictionspermission test in theBasePagePermissionTesterto always return false, preventing any CMS admin UI user from setting view restrictions for pages.It also includes a migration to remove any existing page view restrictions as we are not supporting them and CMS users will no longer be able to remove them themselves after this change.
How to review
Run this branch, then try accessing the page privacy settings for any page in the Wagtail admin UI, as an admin, publishing admin and publishing officer. You should not be presented with the options to change page privacy settings.
Deployment Safety
Bleed and Sandbox deploy automatically on merge, so PRs should be safe to deploy immediately.
Please select one:
Follow-up Actions
List any follow-up actions (if applicable), like needed documentation updates or additional testing.