Use Book access to create User-based book permissions
patchak - January 20, 2009 - 14:58
| Project: | Book access |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Description
Hello,
I think this module would be a pretty good base to add "User-based" Book Access. My idea would be to add Book module permissions on a per user basis.
After talking with the module maintainer, it does not seem too hard to do, I was wondering if other users would be interested in this as well.
Ma idea would be to have the Book Access control all the book, so that when a user has access to a top level book page, he then has access to the whole book.
in any other case, the user cannot see the book, or any of it's attached pages.
Thanks for any comments!
Patchak

#1
This is a feature I need as well. I'd originally planned on doing a separate module, but it makes sense I think to bundle with this one.
My use case is slightly different; only book owners and admins should be able to create child pages of a book. By default, book.module allows users to place pages in all books. But, I think both features can be rolled together.
#2
Here is a patch which implements per-user access control. Currently, all of the settings are additive; user permissions won't remove permissions granted by your group. I don't know if this is the best behavior, but however it goes it should be documented somewhere.
This also fixes a bug in _book_access_restrict_options() where $nid was a typo'ed $bid, causing all books to still show in the dropdown.
@Patchak: To make this work for your case, don't grant any roles access to the book, and then add users as needed to give them view access. Please let me know if that works for you, as my testing is primarily with edit permissions. Thanks!
#3
I wanted to implement the patch
I am not a programmer
Can you guide me How to implement patch
I am using 6.x-1.0-rc2
#4
@isohelpline: New features in Drupal projects always go to the -dev branches.
Your best bet is to download the latest -dev tarball and use that instead of the release candidate. As for applying the patch, it's pretty simple on any system other than Windows; instructions for most operating systems are up on the applying patches page (including Windows). It might be a bit to learn now, but learning diff and patch are really helpful in the long run!
Be sure to follow up in this issue any bugs you encounter with the patch, or if it works as expected. Thanks!
#5
@ deviantintegral : Thanks
I wil try -dev tar ball;
I saw the date of -dev and release candidate is same ....
When I can expect a final release of Book_Access. This module seems to be what I need.
I would like to set subscription for top node of book using any PayPal Module. so that when a person subscribes to the node he/she gets access to complete book. Untill then they are able to see only top node.
I hope this is what it is supposed to do....
If possible please suggest which module can be integrated or supported by Book_Access.
MANOJ JAIN