Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support forwards compatible configuration for private pages/collections #11854

Conversation

lb-
Copy link
Member

@lb- lb- commented Apr 17, 2024

The new settings introduced in #11582 / #11536 only considered one use case of disabling the shared password option. However, we may want to allow for more complex configuration in the future in this area.

Ensure we can support potential future requirements such as #11640 with a more flexible structure for private pages & collections.

The following settings have been changed from boolean to dictionary values.

  • WAGTAIL_ALLOW_SHARED_PASSWORD_PAGEWAGTAIL_PRIVATE_PAGE_OPTIONS
  • WAGTAIL_ALLOW_SHARED_PASSWORD_COLLECTIONWAGTAILDOCS_PRIVATE_COLLECTION_OPTIONS

Example configuration

WAGTAIL_PRIVATE_PAGE_OPTIONS = {"SHARED_PASSWORD": False}
WAGTAILDOCS_PRIVATE_COLLECTION_OPTIONS = {"SHARED_PASSWORD": False}

Reminder: The changed settings are not yet released, no deprecation needed, hopefully this can be merged in for 6.1 so we do not have to change/deprecate things in the future here.

@lb- lb- added status:Needs Review Release blocker component:Privacy Private / protected / restricted pages labels Apr 17, 2024
@lb- lb- added this to the 6.1 milestone Apr 17, 2024
Copy link

squash-labs bot commented Apr 17, 2024

Manage this branch in Squash

Test this branch here: https://lb-cleanupupdate-shared-passwo-95w7i.squash.io

The new settings introduced in wagtail#11582 / wagtail#11536 only considered one use case of disabling the shared password option. However, we may want to allow for more complex configuration in the future in this area.

Ensure we can support potential future requirements such as wagtail#11640 with a more flexible structure for private pages & collections.

The following settings have been changed from boolean to dictionary values.

WAGTAIL_ALLOW_SHARED_PASSWORD_PAGE -> WAGTAIL_PRIVATE_PAGE_OPTIONS
WAGTAIL_ALLOW_SHARED_PASSWORD_COLLECTION -> WAGTAILDOCS_PRIVATE_COLLECTION_OPTIONS
@lb- lb- force-pushed the cleanup/update-shared-password-settings-with-more-flexibility branch from fea6dd0 to 845dcaf Compare April 17, 2024 10:11
@lb-
Copy link
Member Author

lb- commented Apr 17, 2024

I have just updated this PR, we should be using WAGTAILDOCS as the prefix for the collections options.

WAGTAIL_PRIVATE_PAGE_OPTIONS = {"SHARED_PASSWORD": False}
WAGTAILDOCS_PRIVATE_COLLECTION_OPTIONS = {"SHARED_PASSWORD": False}

It is a bit confusing using the COLLECTION name here but I think it's the right way to communicate that this impacts the privacy for documents via collections.

Plus all other documents module items are prefixed with WAGTAILDOCS and that's the direction agreed upon in #11368

Copy link
Collaborator

@gasman gasman left a comment

Choose a reason for hiding this comment

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

LGTM - thanks @lb-!

@gasman gasman merged commit e8f4d56 into wagtail:main Apr 17, 2024
18 checks passed
@lb- lb- mentioned this pull request Apr 17, 2024
8 tasks
@lb- lb- deleted the cleanup/update-shared-password-settings-with-more-flexibility branch April 17, 2024 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:Privacy Private / protected / restricted pages Release blocker
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants