I allow a certain role to change the post date but not the author. This shows the Authoring information tab with only the post date field. But the tab itself shows author as "Anonymous" while the author is retained when the user saves the node.

I think the module prevents Drupal from showing the author to the user of that role in the edit form.

CommentFileSizeAuthor
#3 1969912-3.patch597 bytesopdavies

Comments

kbi’s picture

I confirm this bug using version 7.x-1.12:

  • The tab itself shows author as „Gast“ (german "guest"). Switching language to English does not change anything.
  • Author is not retained when user saves the node again.
Ivan Simonov’s picture

Issue summary: View changes

Try to add string into the "override_node_options_form_alter" function:

/**
 * Implements hook_form_alter().
 */
function override_node_options_form_alter(&$form, $form_state, $form_id) {
  if (!empty($form['#node_edit_form']) && !user_access('administer nodes')) {
    $form['author']['#attached']['js'][1]['data']['anonymous'] = $form['author']['name']['#default_value'];
opdavies’s picture

Status: Active » Needs review
StatusFileSize
new597 bytes

Taken the code from #2 and made it into a patch for review.

  • opdavies committed 42bf5eb on 7.x-1.x authored by Ivan Simonov
    Issue #1969912 by opdavies, kbi, Ivan Simonov: Author shown as anonymous...
opdavies’s picture

Status: Needs review » Fixed

Thanks, committed to 7.x-1.x.

Status: Fixed » Closed (fixed)

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