Closed (fixed)
Project:
Book access
Version:
7.x-2.x-dev
Component:
User interface
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
3 Aug 2011 at 13:06 UTC
Updated:
26 Dec 2012 at 16:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
rooby commentedThis is a very major problem.
1. The default settings have no effect, new books don't inherit the defaults.
2. The default settings don't match the settings per book - On book pages you set permissions per role, per user and for the author but on the defaults you set for users, roles and author. Does that mean you can't have different defaults per role or per user but only for all roles or all users. That pretty much defeats the purpose of the module.
3. To make things harder if you have not set any access settings for a book then everyone is denied from selecting that book in the book area of the node edit form - this is because BookAccess::getBookList() only permits books that have records in the book access tables.
So this means you have to manually set book access every time you create a book, which means you can't have users that have access to create books and book pages unless they also have access to administer book access.
That makes this module only useful for a few use cases.
Comment #2
kenjiru commentedI've noticed the same problem with the default settings, they are not inherited by the new books. At first, I though I did something wrong, but then I read this post.
The Access type column on the default setting page is very confusing. I don't understand who are the users described by Default authors access, Default roles access, Default users access.
The columns in the per book access page are in a different order than the columns from the default settings page. This is another source of confusion for the users.
Comment #3
thelee commentedComment #4
thelee commentedPart of this is a legitimate bug (no propagation of defaults), part of it is a documentation ambiguity (defaults for roles/users is simply the default for whenever a role or user is added to a book page, i believe). i'm working on fixing up both.
Comment #5
thelee commentedwhew ok - these defaults are pretty much completely un-implemented, hence the confusion.
Comment #6
rooby commentedYeah, the current 7 version is a very unfinished port.
Comment #7
thelee commentedThis is the patch (and matching test cases) that I'm going to be using for this fix.
One thing to note - I have no method to enable per-user defaults and still maintain a semi-decent UX, especially for large sites. So, the only "defaults" that can be enabled are for authors and for each role created on a site.
Defaults will _only_ apply to newly created books. If people are pulling in from the dev branch, then after a couple days of this patch if you install it, it will NOT affect any existing books. You should also make sure to _set_ the defaults, though the changes in this patch defaults the defaults (heh) to giving administrator roles full access, authors full access minus change access permissions, and everyone else view access.
I will eventually set up a change to let you either revert a book to the defaults OR revert _all_ books to the defaults, but I'll have to create a separate issue for that because I don't think it's a stable release blocker.
Comment #8
thelee commentedah scratch that optimism above. i just found a bug with my changes, moving back to "active" until i get that fixed.
Comment #9
thelee commentedalright, this is the revised patch that i'm going to use. for the curious, scroll to the bottom to see the new test cases (caseAuthorVsAdminDefaults and caseDefaultsPropagateToNewNode) for a technical explanation of how the patch works.
My earlier comments from #7 still apply -- i've just fixed the bug in that patch with the patch in this post. To re-iterate, since it's important: defaults will only apply to newly-created books.
Comment #10
thelee commentedpatch has been pushed to 7.x-2.x git branch
Comment #11
thelee commentedI've created a new related issue: http://drupal.org/node/1852070
As mentioned in the related issue, it's not a critical bug fix, simply missing functionality, but I leave it here for any interested party to cross-reference.
Comment #12
Zippy commentedHi,
thank you very much for maintaining this project. I appreciate your hard work!
I installed the newest dev version of November 28, 2012 but I still encountered some bugs on the default permission page (/admin/content/book/settings).
When I configure the default access settings I cannot save all fields properly. The 'view book' permission is granted notoriously to every role available.
The author's default permissions seem to be granted correctly, but on the book's individual 'book access'-page these permissions aren't available.
regards
Comment #13
thelee commentedHi again - could you talk a bit more specifically about the issue? Unfortunately, my project time (20% of my work time) is already capped until December begins, so I won't be able to get on it right away, but I am watching the issues.
"View Book" is enabled by default explicitly now because that's how it effectively functioned in the past, at least by my experiences (i.e. everyone could view book pages until a book manually had its access changed). Are you saying that when you un-check "view book" it doesn't go away?
Comment #14
Zippy commentedHi,
maybe it works as intended.
I cannot unset (and successfully save) the 'view book' permission within the default book access settings but I am able to edit the 'view this book' permission for a particular book. In my eyes the behavior of the default access permissions is a little inconsistent because I would expect all my changes to be saved.
kind regards
Comment #15
thelee commentedHi Sven, taking a look at it now
Comment #16
thelee commentedAlright, it's a bug with how i'm setting the defaults for role - am not checking to make sure the role doesn't intentionally have defaults cleared. working on a test case and fix.
Comment #17
thelee commentedAlright, I've used this patch and pushed it to the 7.x-2.x branch, should show up in drupal.org in a day or so.
Comment #18
Zippy commentedHi,
everything seems to work fine now! Thank you very much for your hard work!