Hi,
it seems there is a little bug persistent I mentioned earlier. Now I can give default permissions and the most of them are granted correctly to the concrete book. But if I look inside the access permissions of a particular book (not the defaults) the author's permission are not granted correctly (the fields are empty). I'm not sure but it may be a serious problem for the owner (author) of a book if the rights management is very restrictive. In one case I had to grant the rights manually before I got my access back.
Kind regards!

Comments

Zippy’s picture

Priority: Normal » Critical

Hi,
the problem seems to be even more serious!
When I create a new book everyone can view/edit it! (created the book as admin) I only get the correct rights management if I enable the missing grants for the author I select/deselect one arbitrary access permission for the particular book (access control per book). It seems there is a job, that should run automatically but has to be started manually....

thelee’s picture

Assigned: Unassigned » thelee
thelee’s picture

I think I have an idea what the problem may be judging from your description. I'll take a look.

thelee’s picture

Actually, no, I can't recreate this. Can you tell me what your default permissions are (for author especially)?

I also have a (critical) bug fix coming out today. In it, there's a way to reset permissions to the defaults (which also fixes problems with bad permissions being saved in previous versions). It would be helpful if you could use the new version (-beta2), make sure your defaults are correct, reset everything to defaults, and see if the problem still occurs.

Zippy’s picture

By default the author gets all permissions available. But, as I mentioned, these permissions don't show up in the access table for the concrete book.

thelee’s picture

Alright I see now. I'm going to split comment #1 off into a separate bug, because I can't recreate #1 and I think it might be separate.

thelee’s picture

OK Sven, I can recreate your bug and I think I have a vague idea about it. No promises, but I'll try to get it fixed today since it is pretty critical.

Zippy’s picture

Thank you very much! I really appreciate your hard work!

thelee’s picture

So more specifically - this looks like this is a problem when you retroactively "upgrade" a page into a book. IE

  1. Create a book page
  2. Forget to add it to a book
  3. Go back, add it to book
  4. Book Access shows no permissions for author

versus

  1. While creating book page, have it be "create a new book"
  2. Book Access shows permissions for author

If you have any time, can you verify that this is what's happening? If this is the case I think it's just a missing hook call that should be easy to fix.

Zippy’s picture

I will test what you've mentioned but here is what I do to run into trouble...
I create a completely new book (node/add/book) and save it. That's it. The book shows up without any permissons defined for the author.

Zippy’s picture

Sorry I cannot test this:

Create a book page
Forget to add it to a book
Go back, add it to book
Book Access shows no permissions for author

I have mandatory fields (node references) that can't get any value without a book parent. I need to get a completely new drupal installation to test this. It will take some time...

Here two of the modules I have installed that maybe cause the problems - but I don't know...
http://drupal.org/project/book_made_simple
http://drupal.org/project/nodeaccess_nodereference

thelee’s picture

Alright, how's about this - I'm going to push a patch that is related to what you're talking about (and gets me 0 author permissions when I create a node).

Upgrade to -beta3 when it comes out (not -beta2, doesn't have the patch I'm talking about right now). Save your book_access defaults, reset permissions to defaults (new option on that page), rebuild permissions (you'll automatically be prompted to after you reset permissions to defaults), then see if it works. I suspect you have previously bad data from earlier bugs in book_access that is causing part of the problem here (which -beta2 fixes).

thelee’s picture

For reference, this is the patch i'm going to be using for -beta3

thelee’s picture

Status: Active » Needs review
Zippy’s picture

Status: Needs review » Active

I can confirm that behaviour!

Create a book page
Forget to add it to a book
Go back, add it to book
Book Access shows no permissions for author

Zippy’s picture

Can confirm this (new installation):

While creating book page, have it be "create a new book"
Book Access shows permissions for author

thelee’s picture

Great! This patch will definitely fix this for you.

And crap - unfortunately my home computer is being repaired and my work computer blocks the port I need to push this patch into drupal.org. So, even though I'm literally staring at the bug fix, I can't push it out for a couple days at least.

thelee’s picture

If you're handy with command line tools or with version control, you can apply that patch yourself without worrying about incompatibilities (since it's literally the same code I'll be using).

Zippy’s picture

Okay,
the module book_made_simple causes the error.
This module enables you to define content types that automatically create a book outline. It also enables you to define different content types that can be part of a book.

If I create a book using book_made_simple the author doesn't get the permissions and (probably) the outline is visible for all users until I change some permissions with book access....

Zippy’s picture

Yes, I am able to apply the patch.
I will test it...
Thanks a lot!

Zippy’s picture

I've tested the patch but no change. The problem is definitely caused by books made simple.

Zippy’s picture

I've started a bug report for book made simpe

thelee’s picture

Status: Active » Fixed

This patch has finally been committed, I'll be monitoring the other issue.

thelee’s picture

I applied and pushed a patch to fix the interaciton problem with book_made_simple on my side os you do n't have to manually update the system table. it's in the development snapshot, it'll be a while before it hits release (i want to group some other bug fixes with it).

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

correction