I'm working on backporting the latest D6 release of this module to D5.
Along the way I've come across what I think is a bug in the D6 version; in hook_nodeapi when the permissions of the user are checked before altering the 'authored on' date, I believe the code is checking a (non-existent) generic permission, rather than the specific permission for the node type in question. Thus the change never gets saved to the node, as the user can't possibly have that permission.
I think this is the change required:
- if(user_access('override authored on option')){
+ if(user_access('override ' . $node->type . ' authored on option')){
I've attached a patch file.
As I'm trying to get this into a drupal 5 site, I've not been able to test whether this actually works in the D6 version, but it works in my backport to D5 (which I'll post as a patch shortly).
| Comment | File | Size | Author |
|---|---|---|---|
| override_node_options_authored_on.patch | 691 bytes | mcdruid |
Comments
Comment #1
timmillwoodThanks for spotting that. I plan on working on the module this weekend and address all the bugs.
Also thanks for porting back to 5, I look forward to seeing the patch.
Comment #2
timmillwood