Thank you for this very welcome module which corrects an incomprehensible lack of the original book module.
But shouldn't the book tree menu hide the other books which users don't have permission to edit. Because in the current situation, a user could, even by mistake, move pages to one of these not authorized books and then he wouldn't be able to have anymore access to the moved pages and not even be able to correct the move.
Would it be possible to have the book tree menu showing only the permitted books?
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | book.diff.zip | 1.34 KB | phKU |
Comments
Comment #1
harry slaughterI believe users will only see book tree items which they have access to.
I'll double check this. But I believe I covered this test case.
Comment #2
phKU commentedI confirm users can see in the menu tree books they are not allowed to edit.
The good news is that I wrote the attached book module patch which restricts the book tree menu to the allowed books.
This patch implement a new 'book_toc_recurse_select' validation function called now by the book_toc_recurse function. The added function checks first if the book_access module exists and is enabled. If it's the case, a check is made between the user roles and the book_access database roles access.
I know a patch to the book module is not the best way to go but I've no idea how to have the job done directly in the book_access module...
Hope this helps some folks :)
Comment #3
harry slaughterI have fixed this in CVS. It will be available in the next devel snapshot release.
Please do not hack the book module to get this functionality. That is *very* bad practice.
Comment #4
phKU commentedSorry Harry, I was just in such an urgent need on a production site...
Will this updated book module also be available for Drupal 5.2 ?
Comment #5
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.