diff --git a/forum_access.node.inc b/forum_access.node.inc index f0b44b9..3c21a14 100644 --- a/forum_access.node.inc +++ b/forum_access.node.inc @@ -178,6 +178,13 @@ function _forum_access_node_form(&$form, &$form_state) { $form['options'][$key2]['#access'] = FALSE; } } + $form['options']['#access'] = 1; + break; + case 'revision_information': + $form['revision_information']['#access'] = 1; + break; + case 'comment_settings': + $form['comment_settings']['#access'] = 1; break; case 'shadow': $form['shadow']['#description'] .= '
' . t('Note: Access to this topic and its shadows is controlled by the forum that contains the topic.'); diff --git a/tests/forum_access_test_base.php b/tests/forum_access_test_base.php index 3f148fb..91a668b 100644 --- a/tests/forum_access_test_base.php +++ b/tests/forum_access_test_base.php @@ -529,6 +530,28 @@ class ForumAccessBaseTestCase extends ForumTestCase { $this->clickLink(t('Edit')); $this->assertResponse(200, "^^^ $account->name can edit $test_type topic."); + // Check that moderator gets administrator properties. + if ($is_super_user || user_access('administer nodes', $account)) { + $this->assertText(t('Revision information'), "$account->name sees Revision information."); + $this->assertText(t('Comment settings'), "$account->name sees Comment settings."); + $this->assertText(t('Publishing options'), "$account->name sees Publishing options."); + if (user_access('administer nodes', $account)) { + $this->assertText(t('Menu settings'), "$account->name sees Menu settings."); + $this->assertText(t('Authoring information'), "$account->name sees Authoring information."); + } + else { + $this->assertNoText(t('Menu settings'), "$account->name does not see Menu settings."); + $this->assertNoText(t('Authoring information'), "$account->name does not see Authoring information."); + } + } + else { + $this->assertNoText(t('Revision information'), "$account->name does not see Revision information."); + $this->assertNoText(t('Comment settings'), "$account->name does not see Comment settings."); + $this->assertNoText(t('Publishing options'), "$account->name does not see Publishing options."); + $this->assertNoText(t('Menu settings'), "$account->name does not see Menu settings."); + $this->assertNoText(t('Authoring information'), "$account->name does not see Authoring information."); + } + // Check whether we can Delete our topic. if (empty($account->access['delete']) && !user_access('delete any forum content', $account) && !(user_access('delete own forum content', $account) && $node->uid == $account->uid) &&