diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index f89d149..252c023 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -1759,19 +1759,10 @@ function theme_comment_post_forbidden($variables) {
   $node = $variables['node'];
   global $user;
 
-  // Since this is expensive to compute, we cache it so that a page with many
-  // comments only has to query the database once for all the links.
-  $authenticated_post_comments = &drupal_static(__FUNCTION__, NULL);
-
   if (!$user->uid) {
-    if (!isset($authenticated_post_comments)) {
-      // We only output a link if we are certain that users will get permission
-      // to post comments by logging in.
-      $comment_roles = user_roles(TRUE, 'post comments');
-      $authenticated_post_comments = isset($comment_roles[DRUPAL_AUTHENTICATED_RID]);
-    }
-
-    if ($authenticated_post_comments) {
+    // We only output a link if we are certain that users will get permission
+    // to post comments by logging in.
+    if (user_role_has_permission(DRUPAL_AUTHENTICATED_RID, 'post comments')) {
       // We cannot use drupal_get_destination() because these links
       // sometimes appear on /node and taxonomy listing pages.
       if (variable_get('comment_form_location_' . $node->type, COMMENT_FORM_BELOW) == COMMENT_FORM_SEPARATE_PAGE) {
diff --git a/core/modules/forum/forum.info b/core/modules/forum/forum.info
index c348a2a..8c2a8e1 100644
--- a/core/modules/forum/forum.info
+++ b/core/modules/forum/forum.info
@@ -4,6 +4,7 @@ dependencies[] = node
 dependencies[] = history
 dependencies[] = taxonomy
 dependencies[] = comment
+dependencies[] = block
 package = Core
 version = VERSION
 core = 8.x
diff --git a/core/modules/forum/forum.install b/core/modules/forum/forum.install
index 56f8402..86cdb4b 100644
--- a/core/modules/forum/forum.install
+++ b/core/modules/forum/forum.install
@@ -16,6 +16,18 @@ function forum_install() {
   // @todo Convert to default module configuration, once Node module's content
   //   types are converted.
   variable_set('node_options_forum', array('status'));
+
+  // Enable the forum action messages block
+   db_merge('block')
+  ->key(array('module' => 'forum', 'delta' => 'action_messages_block', 'theme' => variable_get('theme_default')))
+  ->fields(array(
+    'status' => 1,
+    'weight' => -100,
+    'region' => 'content',
+    'pages' => '',
+    'cache' => -1,
+  ))
+  ->execute();
 }
 
 /**
diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module
index 9ec3ec6..aec9b5c 100644
--- a/core/modules/forum/forum.module
+++ b/core/modules/forum/forum.module
@@ -83,6 +83,7 @@ function forum_theme() {
       'render element' => 'form',
       'file' => 'forum.admin.inc',
     ),
+    'forum_action_messages_block' => array(),
   );
 }
 
@@ -162,59 +163,6 @@ function forum_menu() {
 }
 
 /**
- * Implements hook_menu_local_tasks_alter().
- */
-function forum_menu_local_tasks_alter(&$data, $router_item, $root_path) {
-  global $user;
-
-  // Add action link to 'node/add/forum' on 'forum' sub-pages.
-  if ($root_path == 'forum' || $root_path == 'forum/%') {
-    $tid = (isset($router_item['page_arguments'][0]) ? $router_item['page_arguments'][0]->tid : 0);
-    $forum_term = forum_forum_load($tid);
-    if ($forum_term) {
-      $links = array();
-      // Loop through all bundles for forum taxonomy vocabulary field.
-      $field = field_info_field('taxonomy_forums');
-      foreach ($field['bundles']['node'] as $type) {
-        if (node_access('create', $type)) {
-          $links[$type] = array(
-            '#theme' => 'menu_local_action',
-            '#link' => array(
-              'title' => t('Add new @node_type', array('@node_type' => node_type_get_label($type))),
-              'href' => 'node/add/' . $type . '/' . $forum_term->tid,
-            ),
-          );
-        }
-      }
-      if (empty($links)) {
-        // Authenticated user does not have access to create new topics.
-        if ($user->uid) {
-          $links['disallowed'] = array(
-            '#theme' => 'menu_local_action',
-            '#link' => array(
-              'title' => t('You are not allowed to post new content in the forum.'),
-            ),
-          );
-        }
-        // Anonymous user does not have access to create new topics.
-        else {
-          $links['login'] = array(
-            '#theme' => 'menu_local_action',
-            '#link' => array(
-              'title' => t('<a href="@login">Log in</a> to post new content in the forum.', array(
-                '@login' => url('user/login', array('query' => drupal_get_destination())),
-              )),
-              'localized_options' => array('html' => TRUE),
-            ),
-          );
-        }
-      }
-      $data['actions']['output'] = array_merge($data['actions']['output'], $links);
-    }
-  }
-}
-
-/**
  * Implements hook_entity_info_alter().
  */
 function forum_entity_info_alter(&$info) {
@@ -654,6 +602,9 @@ function forum_block_info() {
     'cache' => DRUPAL_CACHE_CUSTOM,
     'properties' => array('administrative' => TRUE),
   );
+  $blocks['action_messages_block'] = array(
+    'info' => t('Forum action messages'),
+  );
   return $blocks;
 }
 
@@ -661,20 +612,28 @@ function forum_block_info() {
  * Implements hook_block_configure().
  */
 function forum_block_configure($delta = '') {
-  $form['block_' . $delta . '_limit'] = array(
-    '#type' => 'select',
-    '#title' => t('Number of topics'),
-    '#default_value' => config('forum.settings')->get('block.' . $delta . '.limit'),
-    '#options' => drupal_map_assoc(range(2, 20)),
-  );
-  return $form;
+  switch ($delta) {
+    case 'active':
+    case 'new':
+      $form['block_' . $delta . '_limit'] = array(
+        '#type' => 'select',
+        '#title' => t('Number of topics'),
+        '#default_value' => config('forum.settings')->get('block.' . $delta . '.limit'),
+        '#options' => drupal_map_assoc(range(2, 20)),
+      );
+      return $form;
+  }
 }
 
 /**
  * Implements hook_block_save().
  */
 function forum_block_save($delta = '', $edit = array()) {
-  config('forum.settings')->set('block.' . $delta . '.limit', $edit['block_' . $delta . '_limit'])->save();
+  switch ($delta) {
+    case 'active':
+    case 'new':
+      config('forum.settings')->set('block.' . $delta . '.limit', $edit['block_' . $delta . '_limit'])->save();
+  }
 }
 
 /**
@@ -685,30 +644,76 @@ function forum_block_save($delta = '', $edit = array()) {
  */
 function forum_block_view($delta = '') {
   $config = config('forum.settings');
-  $query = db_select('forum_index', 'f')
-    ->fields('f')
-    ->addTag('node_access')
-    ->addMetaData('base_table', 'forum_index');
   switch ($delta) {
     case 'active':
-      $title = t('Active forum topics');
-      $query
-        ->orderBy('f.last_comment_timestamp', 'DESC')
-        ->range(0, $config->get('block.active.limit'));
-      break;
-
     case 'new':
-      $title = t('New forum topics');
-      $query
-        ->orderBy('f.created', 'DESC')
-        ->range(0, $config->get('block.new.limit'));
+      $query = db_select('forum_index', 'f')
+        ->fields('f')
+        ->addTag('node_access')
+        ->addMetaData('base_table', 'forum_index');
+      if ($delta == 'active') {
+        $title = t('Active forum topics');
+        $query
+          ->orderBy('f.last_comment_timestamp', 'DESC')
+          ->range(0, $config->get('block.active.limit'));
+      }
+      else {
+        $title = t('New forum topics');
+        $query
+          ->orderBy('f.created', 'DESC')
+          ->range(0, $config->get('block.new.limit'));
+      }
+      $block['subject'] = $title;
+      // Cache based on the altered query. Enables us to cache with node access enabled.
+      $block['content'] = drupal_render_cache_by_query($query, 'forum_block_view');
+      $block['content']['#access'] = user_access('access content');
+      break;
+    case 'action_messages_block':
+      $block['subject'] = t('');
+      global $user;
+      $block['content'] = NULL;
+      $router_item = menu_get_item();
+      // Add link to 'node/add/forum' on 'forum' sub-pages.
+      if ($router_item['path'] == 'forum' || $router_item['path'] == 'forum/%') {
+        $tid = (isset($router_item['page_arguments'][0]) ? $router_item['page_arguments'][0]->tid : 0);
+        $forum_term = forum_forum_load($tid);
+        if ($forum_term) {
+          // Loop through all bundles for forum taxonomy vocabulary field.
+          $field = field_info_field('taxonomy_forums');
+          foreach ($field['bundles']['node'] as $type) {
+            if (node_access('create', $type)) {
+              $block['content'] = t('<a href="@url">Add new @node_type</a>', array(
+                  '@url' => '/node/add/' . $type . '/' . $forum_term->tid,
+                  '@node_type' => node_type_get_label($type))
+              );
+            }
+          }
+          if (!$block['content']) {
+            // Authenticated user does not have access to create new topics.
+            if ($user->uid)
+              $block['content'] = t('You are not allowed to post new content in the forum.');
+            else {
+              // Anonymous user does not have access to create new topics.
+              if (!user_role_has_permission(0, 'create forum content')) {
+                // If authenticated users can post new topic, provide a login/register link.
+                if (user_role_has_permission(DRUPAL_AUTHENTICATED_RID, 'create forum content')) {
+                  $destination = drupal_get_destination();
+                  if (config('user.settings')->get('register') != USER_REGISTER_ADMINISTRATORS_ONLY) {
+                    // Users can register themselves.
+                    $block['content'] = t('<a href="@login">Log in</a> or <a href="@register">register</a> to post new content in the forum.', array('@login' => url('user/login', array('query' => $destination)), '@register' => url('user/register', array('query' => $destination))));
+                  }
+                  else {
+                    // Only admins can add new users, no public registration.
+                    $block['content'] = t('<a href="@login">Log in</a> to post new content in the forum.', array('@login' => url('user/login', array('query' => $destination))));
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
       break;
   }
-
-  $block['subject'] = $title;
-  // Cache based on the altered query. Enables us to cache with node access enabled.
-  $block['content'] = drupal_render_cache_by_query($query, 'forum_block_view');
-  $block['content']['#access'] = user_access('access content');
   return $block;
 }
 
diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumActionMessagesTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumActionMessagesTest.php
new file mode 100644
index 0000000..1f50663
--- /dev/null
+++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumActionMessagesTest.php
@@ -0,0 +1,120 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\forum\Tests\ForumActionMessagesTest.
+ */
+
+namespace Drupal\forum\Tests;
+
+use Drupal\simpletest\WebTestBase;
+
+/**
+ * Tests forum behavior for action messages.
+ */
+class ForumActionMessagesTest extends WebTestBase {
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = array('block', 'taxonomy', 'comment', 'forum');
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Forum action messages',
+      'description' => 'Tests user action messages.',
+      'group' => 'Forum',
+    );
+  }
+
+  public function setUp() {
+    parent::setUp();
+
+    // Create users.
+    $this->admin_user = $this->drupalCreateUser(array(
+      'create forum content',
+      'edit own forum content',
+      'edit any forum content',
+      'administer nodes',
+      'administer permissions',
+    ));
+    $this->user_with_access = $this->drupalCreateUser(array(
+      'create forum content',
+    ));
+    $this->user_without_access = $this->drupalCreateUser();
+  }
+
+  /**
+   * Tests that users receive correct action messages.
+   *
+   * Verifies the presence of forum action messages:
+   * - "Log in to post new content in the forum"
+   *   when anonymous, admin-only registration + auth can post
+   * - "Log in or register to post new content in the forum."
+   *   when anonymous, user can register + auth can post
+   * - "You are not allowed to post new content in the forum."
+   *   when the user is authenticated and does not have access to post
+   *
+   * @todo test for no message when anonymous + authenticated cannot post
+   * @todo test for create new message displayed ok for those who can post
+   */
+  public function testForumActionMessages() {
+    $this->drupalLogin($this->admin_user);
+
+    $langcode = LANGUAGE_NOT_SPECIFIED;
+
+    // The forum ID to use.
+    $tid = 1;
+
+    // Create a test node.
+    $title = $this->randomName(20);
+    $edit = array(
+      'title' => $title,
+      "body[$langcode][0][value]" => $this->randomName(25),
+      "taxonomy_forums[$langcode]" => array(1),
+    );
+
+    // Create the forum topic, preselecting the forum ID via a URL parameter.
+    $this->drupalPost('node/add/forum/' . $tid, $edit, t('Save'));
+
+    // Set registration to visitors.
+    $config = config('user.settings');
+    $config->set('register', USER_REGISTER_VISITORS)->save();
+
+    $this->drupalLogout();
+
+    // Log in as authenticated user who does not have permission to post content
+    $this->drupalLogin($this->user_without_access);
+
+    // Access the forum list as an authenticated user who does not have access
+    // to post new content and test for presence of correct message.
+    $this->drupalGet('forum');
+    $this->assertRaw(t('You are not allowed to post new content in the forum.'), 'You are not allowed to post new content message appears.');
+
+    $this->drupalLogout();
+
+    $this->drupalLogin($this->admin_user);
+    $edit = array();
+    $edit["authenticated[create forum content]"] = true;
+    $this->drupalPost('admin/people/permissions', $edit, t('Save permissions'));
+    drupal_static_reset('user_access');
+    drupal_static_reset('user_role_permissions');
+    $this->assertText(t('The changes have been saved.'), t('Successful save message displayed.'));
+    $this->drupalLogout();
+
+    // Access the forum list as an anonymous user and test for presence of
+    // login or register to post content message.
+    $this->drupalGet('forum');
+    $this->assertRaw(t('<a href="@login">Log in</a> or <a href="@register">register</a> to post new content in the forum.', array('@login' => url('user/login', array('query' => array('destination' => 'forum'))), '@register' => url('user/register', array('query' => array('destination' => 'forum'))))), 'Log in or register to post message appears.');
+
+    // Set registration to administrator only.
+    $config->set('register', USER_REGISTER_ADMINISTRATORS_ONLY)->save();
+
+    // Access the forum list as an anonymous user and test for presence of
+    // login to post content message.
+    $this->drupalGet('forum');
+    $this->assertRaw(t('<a href="@login">Log in</a> to post new content in the forum.', array('@login' => url('user/login', array('query' => array('destination' => 'forum'))))), 'Log in to post message appears.');
+
+  }
+}
diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumIndexTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumIndexTest.php
index 7ae7d5f..ff9b106 100644
--- a/core/modules/forum/lib/Drupal/forum/Tests/ForumIndexTest.php
+++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumIndexTest.php
@@ -19,7 +19,7 @@ class ForumIndexTest extends WebTestBase {
    *
    * @var array
    */
-  public static $modules = array('taxonomy', 'comment', 'forum');
+  public static $modules = array('block', 'taxonomy', 'comment', 'forum');
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeAccessPagerTest.php b/core/modules/node/lib/Drupal/node/Tests/NodeAccessPagerTest.php
index bf8f845..ccde4a6 100644
--- a/core/modules/node/lib/Drupal/node/Tests/NodeAccessPagerTest.php
+++ b/core/modules/node/lib/Drupal/node/Tests/NodeAccessPagerTest.php
@@ -19,7 +19,7 @@ class NodeAccessPagerTest extends WebTestBase {
    *
    * @var array
    */
-  public static $modules = array('node_access_test', 'comment', 'forum');
+  public static $modules = array('block', 'node_access_test', 'comment', 'forum');
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/system/lib/Drupal/system/Tests/Module/DependencyTest.php b/core/modules/system/lib/Drupal/system/Tests/Module/DependencyTest.php
index d55d472..99573ae 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Module/DependencyTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Module/DependencyTest.php
@@ -134,11 +134,11 @@ function testModuleEnableOrder() {
     $this->assertModules(array('module_test'), TRUE);
     state()->set('module_test.dependency', 'dependency');
     // module_test creates a dependency chain:
-    // - forum depends on taxonomy, comment, history, and poll (via module_test)
+    // - forum depends on block, taxonomy, comment, history, and poll (via module_test)
     // - taxonomy depends on options
     // - poll depends on php (via module_test)
     // The correct enable order is:
-    $expected_order = array('comment', 'history', 'options', 'taxonomy', 'php', 'poll', 'forum');
+    $expected_order = array('block', 'comment', 'history', 'options', 'taxonomy', 'php', 'poll', 'forum');
 
     // Enable the modules through the UI, verifying that the dependency chain
     // is correct.
@@ -146,7 +146,8 @@ function testModuleEnableOrder() {
     $edit['modules[Core][forum][enable]'] = 'forum';
     $this->drupalPost('admin/modules', $edit, t('Save configuration'));
     $this->assertModules(array('forum'), FALSE);
-    $this->assertText(t('You must enable the History, Taxonomy, Options, Comment, Poll, PHP Filter modules to install Forum.'));
+    $this->assertText(t('You must enable the History, Taxonomy, Options, Comment, Block, Poll, PHP Filter modules to install Forum.'));
+    $edit['modules[Core][block][enable]'] = 'block';
     $edit['modules[Core][history][enable]'] = 'history';
     $edit['modules[Core][options][enable]'] = 'options';
     $edit['modules[Core][taxonomy][enable]'] = 'taxonomy';
diff --git a/core/modules/system/lib/Drupal/system/Tests/Path/UrlAlterFunctionalTest.php b/core/modules/system/lib/Drupal/system/Tests/Path/UrlAlterFunctionalTest.php
index b987739..21320df 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Path/UrlAlterFunctionalTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Path/UrlAlterFunctionalTest.php
@@ -19,7 +19,7 @@ class UrlAlterFunctionalTest extends WebTestBase {
    *
    * @var array
    */
-  public static $modules = array('path', 'forum', 'url_alter_test');
+  public static $modules = array('block', 'path', 'forum', 'url_alter_test');
 
   public static function getInfo() {
     return array(
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 285b9a7..688462f 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -416,6 +416,29 @@ function user_role_permissions($roles = array()) {
 }
 
 /**
+ * Determines the permissions for one or more roles.
+ *
+ * @param string $rid
+ *   Role ID of interest
+ *
+ * @param string $permission
+ *   Permission name, such as "administer nodes"
+ *
+ * @return boolean
+ *   TRUE if the given role has the requested permission.
+ */
+function user_role_has_permission($rid, $permission) {
+  // Get permissions of role given by ID.
+  // @todo: the user_role_permission method asks for rid => name but the name is
+  //   never used, should be improve?!
+  // @todo: should it be possible to handle multiple IDs?
+  $perms = user_role_permissions(array($rid => $rid));
+
+  // Returns TRUE if the role has the requested permission.
+  return isset($perms[$rid][$permission]);
+}
+
+/**
  * Determine whether the user has a given privilege.
  *
  * @param $string
