Edit Own Book

Shawn DeArmond - August 12, 2008 - 23:56
Project:Book access
Version:5.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Shawn DeArmond
Status:patch (code needs review)
Description

Add a perm called "Edit Own Book" so that if the current user is the author of the top book page, that user can edit any page in that book... regardless of which role they've been assigned and which roles have been granted access to the book.

I have some code for this, but it's not done yet.

#1

Shawn DeArmond - August 27, 2008 - 01:02
Status:active» patch (code needs review)

Here's a patch for this feature. I've tested it a little.

Only kinda works with nodes that are not of type: 'book' which have been added to the outline. It allows the user to modify the outline position of that node, but does not allow the user to actually edit the node. Not sure how we want to deal with those node types.

AttachmentSize
edit_own_book_code.patch1.51 KB

#2

Shawn DeArmond - August 27, 2008 - 20:53

Here's an updated patch. It has the same functionality, it's just a little more streamlined. A little "prettier".

AttachmentSize
edit_own_book_code2.patch1.51 KB

#3

Harry Slaughter - September 13, 2008 - 01:22

not sure if i want to implement this feature within this module. the idea of book_access is to protect books on a per-*book* basis according to roles, not on a per-page basis according to user.

if you want finer grained control than this, you may want to look at a module such as content access.

#4

Shawn DeArmond - September 13, 2008 - 05:45

In effect it is on a per-book basis. The user can access the whole book if the user is the author of the top book page.

 
 

Drupal is a registered trademark of Dries Buytaert.