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).

CommentFileSizeAuthor
override_node_options_authored_on.patch691 bytesmcdruid

Comments

timmillwood’s picture

Thanks 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.

timmillwood’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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