In its current version, Squeeze is shown on each and every node edit form (for those with the right permissions). More logical would be to show these settings only on certain content types defined by an administrator.

Please find attached a patch that does this:
- The admin screen (introduced in #1232544: Allow Squeeze to be easily restricted to anonymous users only) is extended with a list of checkboxes to enable Squeeze for some content types only.
- Backwards compatible: if no content type is selected, Squeeze is enabled for all content types (current behavior).
- This patch also solves #1233608: User without "configure node's squeeze settings" permission will delete Squeeze settings for nodes edited but slightly different and in an even more robust way, see my 1st comment over there.
- The code (for the admin page and the introduced helper function) is a copy of how I added this feature to "Availability Calendars", so it is proven code.

CommentFileSizeAuthor
enable-content-type.patch3.7 KBfietserwin

Comments

pavel.karoukin’s picture

Status: Needs review » Closed (fixed)