Publish nodes permission

Created on 25 January 2008, over 17 years ago
Updated 19 March 2025, about 1 month ago

In our instance of Drupal, we allow authenticated users to publish to the front page. The only way to give users this privilege is to give them access to the "administer nodes" permission:

  $form['options'] = array(
    '#type' => 'fieldset',
    '#access' => user_access('administer nodes'),
    '#title' => t('Publishing options'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
    '#weight' => 25,
  );
...

However, because of the way node_access is implemented, having the "administer nodes" privilege gives you full access to all node operations, including editing other users nodes:

function node_access($op, $node, $account = NULL) {
...
  if (user_access('administer nodes', $account)) {
    return TRUE;
  }

The patch included creates a new permission, "publish nodes," which allows an admin to select which groups should be able to publish nodes, thus separating the privilege from the ability to administer nodes.

✨ Feature request
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

node system

Created by

πŸ‡ΊπŸ‡ΈUnited States jgoldberg

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024