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

Allow page to change private page options #11862

Open
smark-1 opened this issue Apr 17, 2024 · 1 comment
Open

Allow page to change private page options #11862

smark-1 opened this issue Apr 17, 2024 · 1 comment

Comments

@smark-1
Copy link
Contributor

smark-1 commented Apr 17, 2024

Is your proposal related to a problem?

I would like to be able to disable private pages or limit the types of private pages for specific page models. I sometimes like to disable being able to change the privacy of the child pages and control the privacy from the parent page. There are other occasions as well where I would like to only allow the page's privacy to be switched to specific groups and disable the password and logged-in users. While there is in the latest version a global setting to disable the shared password option, I would like to sometimes only disable the shared password for specific page models.

Describe the solution you'd like

I would like the page model to have a property and/or a method to allow overriding the default private page permissions or a flag to disable private pages.

 class BlogPage(Page):
     private_page = ["logged_in", "shared_password", "user_groups"]
 
    def get_private_page(self):
       return self.private_page

    # or
   disable_private_pages = True

   def get_disable_private_pages(self):
       return self.disable_private_pages

Describe alternatives you've considered

I looked through the documentation and could not find a simple way to do this. I asked how to do this on the wagtail slack and the suggestion I got was to see if it is possible to do this with wagtail permissions or add a signal for page save. I didn't look into these options so much, but it seems a bit more complex than what I would like.

Working on this

I would be happy to work on this myself once the issue is accepted, but I am not very familiar with how the page editor part of wagtail is developed and what skills would be needed. Is this part made with react or something else?

Anyone can contribute to this. View our contributing guidelines, add a comment to the issue once you’re ready to start.

@lb-
Copy link
Member

lb- commented Apr 23, 2024

See also some related issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants