wagtail / wagtail

A Django content management system focused on flexibility and user experience

Home Page:https://wagtail.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow page to change private page options

smark-1 opened this issue · comments

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.

See also some related issues.

  • #11640 - maybe a good issue to understand as it relates to global settings in this area.
  • #10588 - overarching issue with a bunch of recommend improvements to private/restricted models.