In evaluating this module (looks almost exactly like what I want), I came across a problem:

I gave authenticated users "add content to personal books", "create personal books", and (mistakenly) "add content to books".

Then I do this:

1) Create a new book page
2) Select for book (this appears to be default for those with "add content to books" perm)
3) Save
4) Click "outline" tab
5) Select , and save

result: as in title. Added child pages also have no "outline tab", though the outline fields are available on all the node forms.

The bid does for the book also does not appear in the book_manager table.

Done on D6.10 clean install.

CommentFileSizeAuthor
#5 book_manager-452740.1.patch1.81 KBevoltech

Comments

mtsanford’s picture

Title: Book w/ no outline tab or access or "Customize Book" link » Book w/ no outline tab access or "Customize Book" link
mtsanford’s picture

Let's try that again....

1) Create a new book page
2) Select <none> for book (this appears to be default for those with "add content to books" perm)
3) Save
4) Click "outline" tab
5) Select <create a new book>, and save
jgraham’s picture

Assigned: Unassigned » jgraham

mstsanford,

I see the issue... this is creating a regular book for a user with only permissions to create a personal book.

I think I'll have to add an additional submit handler on that form in this scenario.

thanks for the detailed steps to reproduce this made it much easier to isolate the bug.

evoltech’s picture

Assigned: jgraham » evoltech

I will be submitting a patch for this soon.

evoltech’s picture

StatusFileSize
new1.81 KB

It took me a bit reading through this code to see the best place to place this, and the resulting solution is very little code, because of how well designed the logic of this module is and how closely integrated into the book module this is.

This patch adds a submit handler to the book_outline form in the case that a user does not have access to create new books, but can create personal books. when the submit handler is called it makes sure that if set as a new book, the book is added as a personal book.

evoltech’s picture

Status: Active » Needs review
marcp’s picture

Status: Needs review » Fixed

Committed a slightly different fix. There was already an additional submit handler, it just didn't deal with things properly in the case that is outlined (get it -- outlined?) above.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.