Closed (works as designed)
Project:
Drupal core
Version:
6.x-dev
Component:
book.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Jul 2010 at 15:07 UTC
Updated:
11 Jul 2010 at 12:57 UTC
The book modules allows for restricting the node types that are allowed for participating in the book hierarchy. The problem is that the Outline tab continues to appear even on nodes that are not enabled. A simple fix is to modify the _book_outline_access to look at the list of allowed types. The code should be:
function _book_outline_access($node) {
return user_access('administer book outlines') && node_access('view', $node) && book_type_is_allowed($node->type);
}
Comments
Comment #1
avpadernoWould you be able to provide a patch?
Comment #2
avpadernoThe function works as expected, though. As reported in the book settings page (admin/content/book/settings):
The difference between the users with permission to add content to books, and users with permission to administer book outlines is that the first users can add a node to a book when they edit or create a node (whose content type is selected in the book settings); the second users can add a node to a book by using the tab , and they can add all the content types to books.
If you don't want a user is able to add every content type to a module, then don't give him the permission to administer book outline; as the permission contains the word , it should not be given to all the users.
I am changing the status of this report.