//$Id$

Drupal Module: Coherent Access Book

This module integrates Coherent Access permissions in Drupal book module node
hierarchies. Users who can edit the root nodes of books can set Coherent Access
grants for all nodes in the book hierarchy.

INSTALLATION
============
* You need the Book and Coherent Access modules enabled.
* Install like other drupal modules.
* You have to permissions to desired user roles:

  If you only use the core book module, assign "create new books" and "add content to books"

  If you use the Book Manager contrib module, you can opt to use that module's
  "add content to personal books" and "create personal books" instead.

* There are [currently] no admin options nor permissions.

USAGE
=====
All nodetypes controlled by Coherent Access, that are part of book hierarchies,
will automatically recieve grants.

EXAMPLE
=======
Say you have a book hierarchy consisting of:

    node/1
      node/2
      node/3
        node/4

If you go to node/1/edit (and have edit permissions), and this node type has been
enabled in Coherent Acess, you will see the normal "Shared editing" fieldset.

If you add user1 and user2 to be editors, and then hit save, then all nodes in
the book hierarchy (1,2,3,4) will also be editable by user1 and user2.

TODO
====
* Buggy/weird use case:
    - Book root node is not owned by current user
    - Book root node is not private (viewable by all)
    - You are not viewer nor editor to that book
    - You create a child node
        mark it "private"
        and assign it to that book
    - After saving, the child node is assigned to the book where you specified,
      but you can't view the node ("Access denied"). Also, the book's owner
      probably didn't want you to put stuff in there either.

    If you do the same but mark your new node non-"private", then you will be
    able to see the node, and also edit it. The problem would only be you
    putting stuff into places you were not invited to =)

  This happens either with the core book module or with the Book Manager module.

  Possible solution: use an after_build form function to (?) hide the option
  from the book selector.

MORE INFO
=========
TODO