When creating an instance, only the book's root has an author specified. All subpages are set to Anonymous. This patch fixes this, as well as allows users to specify a node author. This patch still needs validation set up for users which don't exist, so it's waiting on #351943: Allow a template to be used for the book introduction which I'll be committing shortly. It should also check for permission to change authors.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 357436_missing_node_authors_2.patch | 4.31 KB | deviantintegral |
| #1 | 357436_missing_node_authors_1.patch | 4.88 KB | deviantintegral |
| missing_node_authors.patch | 2.12 KB | deviantintegral |
Comments
Comment #1
deviantintegral commentedHere is an updated patch which applies against HEAD and implements username validation. It currently adds a new 'set outline authors' permission, with the intent to not have to give users the administer nodes permission. Unfortunately, drupal_execute() still respects that permission, so something different will need to be done to allow the author to be set, or instead we'll just have to use 'administer nodes' as the permission to check.
Comment #2
deviantintegral commentedIt turns out that changing an author without having the "administer nodes" permission is problematic. There is work going in for Drupal 7 to remove the administer nodes permission and split up it's functionality; when that eventually is released, this feature can be changed to take advantage of it. For now, for consistency with the rest of how Drupal works, it requires the 'administer nodes' permission.
Comment #3
agentrickardYou could also run an UPDATE query to manually set the UID after node creation, which is hackish, but practical.
Comment #4
deviantintegral commentedYeah, I may do that in the future, but for now I'm trying to keep away from directly modifying the tables if I can.
I've committed the patch in #2.