Allow the book outline functionality on non-book-enabled node types to be hidden from users with the "Administer book outlines" permission

Created on 25 June 2009, almost 15 years ago
Updated 1 May 2024, about 2 months ago

It is somewhat disconcerting to users who have the 'administer book outlines' permission to see the 'outline' tab and 'outline' fieldset on every single node type, regardless of whether that node type has been configured to be allowed in books. I can see a use-case where that might be a desired feature, but i think its probably relatively rare.

The steps to repeat this are:
with a clean install of drupal,
1) turn the book module on
2) configure book module to only use 'book' content type
3) as admin or a user with 'administer book outlines' permission, create or edit a 'page' node (not a book node)

i would expect that 'outline' would not show for 'page' nodes since only 'book' nodes are set to use outlines.

I created the following patch to gracefully address this issue. The simplest solution I could think of was to create an additional checkbox in the content/book/settings form that when checked restricts book outlines to only the designated book-types. By default this is not checked, so that any drupal installs that might rely on "seeing outline information on all node types regardless of config settings" wont be broken by this patch after upgrading.

Its pretty basic, doesn't change anything by default and so hopefully it will be well received (and help someone too!)

Feature request
Status

Needs work

Version

1.0

Component
Book 

Last updated about 2 hours ago

Created by

🇺🇸United States netw3rker

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • Performance

    It affects performance. It is often combined with the Needs profiling tag.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024