Problem/Motivation

It took me a long time to figure out what the Node - Administer Content (internally known as administer-nodes) permission was for. Documentation for it elsewhere is scarce and IMHO the title (which we can't change now, clearly) is misleading.

The description (after the usual "trusted role"' warning) reads:

Promote, change ownership, edit revisions, and perform other tasks across all content types.

To me, the title "Administer Content" implies full edit permissions, but that's not the case, e.g.:

  • It doesn't allow you to edit all nodes - you get no choices in the Operations column on /admin/content without individual create/edit/delete permissions for specific content type or the "Bypass Content Access Control" permission
  • It doesn't allow you to view or edit content types (/admin/structure/types) - that's what Administer Content Types is for (plus "Use the administration pages and help")
  • Attempting anything in the /admin/content Actions dropdown will also give a No access message - e.g. marking the content as sticky, promoting it, changing the publish state etc.
  • You can't access /node/1/revisions with Administer Content alone.

From my testing and checking the source code, it seems, providing I already have permission to edit a content type (without this you can't do anything), Administer Content gives me the Author (uid, created) and Promotion (promoted, sticky) panels on the edit screen, plus the Revisions tab.

NB: we still refer to "administer nodes" rather than "administer content" in a few places ("Role requires" text in other permissions) - I've submitted a separate patch to fix this.

Proposed resolution

Can we:

  • remove or clarify the ambiguous 'perform other tasks'
  • indicate "Administer Content" needs to be used in conjunction with edit permissions / doesn't allow editing on it's own
  • consider position/relative importance of Administer Content vs Bypass Content Access Types etc. in permissions list (which combination do most users need?)

Current suggested new text:

Warning: Give to trusted roles only; this permission has security implications. Change ownership, date/time, promote or make sticky and edit past revisions for content in all content types. Does not include view, edit or delete.

Remaining tasks

Agree wording. Write patch.

User interface changes

New description on /admin/people/permissions.

API changes

None.

Data model changes

None.

Comments

wturrell created an issue. See original summary.

pashupathi nath gajawada’s picture

Assigned: Unassigned » pashupathi nath gajawada

Shall I look into this.

wturrell’s picture

By the way, I've submitted a patch to change "administer nodes" to "administer content" in the other descriptions
https://www.drupal.org/node/2843030

wturrell’s picture

Issue summary: View changes

Rephrase my suggestions for clarity.

wturrell’s picture

Issue summary: View changes

Add some suggested wording. Convert issue summary to template.

wturrell’s picture

Issue tags: +Usability

Tag to encourage feedback on wording etc.

dpi’s picture

Title: Permissions - better description needed for Administer Content » Improve 'administer content' permission description
Component: user system » node system
Issue summary: View changes
Related issues: +#2843030: Replace 'node' terminology with 'content' in node permissions.

Possibly reposition Administer Content row.

There is no reason to do this.

This comment is not necessarily an endorsement of this issue.

dpi’s picture

Issue summary: View changes

Fixed html

wturrell’s picture

Simple text change so quicker for me to do to make progress.

wturrell’s picture

Issue summary: View changes
Status: Active » Needs review
Issue tags: +String change in 8.2.0
StatusFileSize
new710 bytes

- Permission description updated with my suggestion.
- Not aware of any particular Drupal YML line-break coding standard for long lines.
- Tagged for translation.
- Issue summary updated to be more useful re: relative position of permissions in list.

wturrell’s picture

Assigned: wturrell » Unassigned
dpi’s picture

Status: Needs review » Needs work
+++ b/core/modules/node/node.permissions.yml
@@ -8,7 +8,7 @@ administer content types:
+  description: 'Change ownership, date/time, promote or make sticky and edit past revisions for content in all content types. Does not include view, edit or delete.'
promote or make sticky

Its not one or the other, both are possible

date/time

Of what? (creation date) Why is this worthy of mention?

Also, preferably no slashes

Does not include view, edit or delete.

Typically we only mention what a permission does, not what is does not do.

wturrell’s picture

Status: Needs work » Needs review

Its not one or the other, both are possible

I don't believe that'll mislead people given they're checkboxes, but sure, it sh/could be a comma.

Of what? (creation date) Why is this worthy of mention?

Yes. This permission is an unusual combination of privileges, not documented well elsewhere. I favour listing all we know about unless the description becomes unwieldy.

Typically we only mention what a permission does, not what is does not do.

The title "Administer Content" implies the ability to perform general edits, which is misleading. We should be more explicit that it's only a partial permission.

wturrell’s picture

StatusFileSize
new764 bytes
new708 bytes

"promote or make sticky" -> "promote, make sticky"

chiranjeeb2410’s picture

Assigned: Unassigned » chiranjeeb2410

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

wturrell’s picture

Assigned: chiranjeeb2410 » Unassigned
Issue tags: -String change in 8.2.0 +String change in 8.3.0

Unassigning due to lack of activity (but if you'd like to review it or make a change go ahead.)
Updating String change tag.

chiranjeeb2410’s picture

Status: Needs review » Reviewed & tested by the community

@wturell, changes are good. Patch supplies well. Changing to RTBC.

xjm’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: -String change in 8.3.0
Related issues: +#2561325: Wrong description for 'administer content types' permission, +#620446: Rewrite permission titles and descriptions

Thanks everyone for improving the text of this key permission. Accurately communicating what powerful permissions like this do is very important.

I'm not sure this is the best change. I find the last sentence actually confusing. In general our overall pattern should be to shorten or remove permission descriptions rather than lengthen them, because we should make the label say everything the user needs to know about the permission if possible. That may not be possible in this case because it is a complex permission.

Looking over the introduced changes with a word diff, this patch:

  1. Makes "Change ownership" first
  2. Moves "Promote" later. I guess that makes sense since it is not by itself the most important permission.
  3. Adds "date/time". The meaning of that is unclear.
  4. Changes "edit revisions" to "edit past revisions". While I see the goal of this change, it is actually implying that the user can't edit future revisions, and I believe they can with this permission and core or contrib modules that allow that. Does the permission also allow changing which revision is the published one? The summary says "You can't access /node/1/revisions with Administer Content alone" so maybe not. Not sure about that change.
  5. Changes "across content types" to "for content in all content types". That's probably better, although it is more words.
  6. Removes "perform other tasks". I can see the goal in removing this because it's vague. However, it looks like maybe this was what was replaced with "date/time", to give the user a complete picture of what the permission could do, maybe? The problem with that is that other modules may also use this permission to allow content administrators to do things with their module, that won't be listed here. I agree "perform other tasks" is not really that helpful though.
  7. Removes the serial (Oxford) comma. We should put it back; it's in our content guidelines. :)
  8. Finally, the added sentence "Does not include view, edit or delete." That's kind of confusing and I wouldn't necessarily know what it means. I think this is say that the user who can administer all these things can do so only if they already have access to the content.

So, maybe a better improvement would be to have something like:

Change metadata like author, published time, 'promote' and 'make sticky', etc. for content the user may access in any content type, and edit other revisions.

That's just a rough draft; it can probably be better. I might not be following all the content standards there for the descriptions. I just wanted to show how we could explain the limitations on the permission more clearly.

In general, a lot of usability work is done on these UI descriptions, and many of them have undergone prior usability review. So, it's good to get usability review before changing them. However, this issue does not seem to be attached to any meta issue for permission descriptions that are being updated to get a high-level picture on this work. Can we create one and attach these issues to it?

Finally, I'm adding a couple of past related issues.

So, let's look more at how we could improve this text, and look at past improvements made to it and related permissions as well as future improvements that are proposed for other related permissions. Then, with that larger picture, we can come up with an improved description and get usability review to make sure we are achieving our goal.

Thanks everyone for your careful attention to detail here!

wturrell’s picture

Thanks @xjm. This will also take me ages, so I'll split into separate long comments.
The first is specifically re: the history of this permission (I've traced changes it right back to D7).

TL;DR - it didn't IMHO have a full UX review when first created and the one edit increased the ambiguity.
Also, a mistake in the patch got committed and wasn't spotted until a year later.

"Administer Content" (administer nodes) never had a description, until #1980010: Add description to "Administer content" permission
(13 months from reporting to commit to 8.0.x-dev in July 2014)

Summary of comments at the time:

- problem: it's not obvious what it does
- back and forth over whether it should be concise or list everything
- the usual (imho) "drive-by" reviewing problem (does the patch work? looks good to me, needs review->RTBC etc.)
- webchick and catch both asked for a usability review.

Catch's full comment feels relevant:

"Still needs usability review. We went through lots of permissions to remove the descriptions. I'm also not sure explicitly
listing what this allows you to do helps - modules add other features that use this permission, or change the permission
on those quite often."

…which I interpret as:

- having any description may be more confusing than having none
- it's primarily of use for developers, rather than site users

(worth getting an opinion from him?)

TravisCarden's original wording:

Perform administrative content operations such as promoting, changing ownership, and editing revisions across all content types.

[some time passes] description deemed too verbose, subsequent edit to:

Promote, change ownership, edit revisions, and perform other administrative tasks across all content types.

Incidentally, not criticising Travis at all - especially as the bit that was cut from his version - "administration content operations", hints that it's not really the same/as straightforward as create/edit/delete. ("Perform certain", perhaps? Will come back to the wording at a later point.) Plus he reported it for the same reasons I did - I think it's a bit of a messy set of privileges.

Anyway, that edit didn't get any further scrutiny – the subsequent patch was tested, RTBC'd and committed without further comment.

Unfortunately, although Travis' original patch (#1) in April 2013 was correct, those made later (#12,#14) added the new text to "administer content types", not "administer nodes", possibly because the contributor came to the issue fresh and was confused over the issue title – or simply what the permissions actually did (remember neither of them had a description in the UI at that point...)

This was compounded by not making an interdiff, which would have shown to contributor (or the reviewer if they'd remembered to check, or indeed alex when he committed it) that a different line had been changed.

Additionally, someone had uploaded a screenshot of the original patch with the correct description altered, but that was not hidden, so it would have been understandable to glance at that and assume everything was OK..

The issue you found #2561325: Wrong description for 'administer content types' permission - was a year after everything had been moved to node.permissions.yml - and identifies the description is in the wrong place.
Btw, for anyone reading that issue - it's also confusing – it has before and after screenshots attached, but only the "after" was added to the issue summary (and in a position where you might expect to see the 'before').

I'll go through your other points and update the issue summary when I have time.

wturrell’s picture

Add related "View site reports" permission issue

chiranjeeb2410’s picture

@wturrell, can you suggest the changes to be issued as of now?

chiranjeeb2410’s picture

StatusFileSize
new1.59 KB

@wturell, made new changes. Please review

chiranjeeb2410’s picture

uploading interdiff here.

chiranjeeb2410’s picture

joyceg’s picture

Status: Needs review » Reviewed & tested by the community
wturrell’s picture

Status: Reviewed & tested by the community » Needs work

This needs further discussion/work, as per previous lengthy comments by @xjm and I.
Also when you mark issues as RTBC, please explain what you've done to review it, why you think it's ready etc. (Thanks!)

wturrell’s picture

Assigned: Unassigned » wturrell
chiranjeeb2410’s picture

@wturell,

Could you please describe the changes required as of now ?

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

geek-merlin’s picture

webel’s picture

@wturrel thanks for raising this issue, I agree especially that "perform other tasks across all content types" is too vague, it could mean anything, and the only way to know what the consequences are is to tediously experiment. I've been using Drupal for about 10 years and I still sometimes struggle with that permission setting.

bramdriesen’s picture

Version: 8.6.x-dev » 8.8.x-dev
Assigned: wturrell » Unassigned

I guess this should target the latest dev release. And un-assigning the issue since there is nothing done since 2017 =)

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

mxr576’s picture

I've been using Drupal for about 10 years and I still sometimes struggle with that permission setting.

+1

Figuring out what "administer nodes" gives access exactly is almost impossible to tell. My gut says both core and contrib modules are using it incorrectly. Probably we should get rid of these AIO permissions and only support granural ones which makes more clear that who can access to what and why.

bdanin’s picture

Status: Needs work » Reviewed & tested by the community

I've reviewed the patch in #23, and this is the updated recommendation:

Change ownership, published time, promote, make sticky and edit past revisions of content, for all content types. Does not include view, edit or delete permissions to users without prior access to the content.

This is a big improvement and I support this change.

mxr576’s picture

I am not sure if "edit past revisions of content" should be tied to this permission. Probably revisioning system should have it own permission for handling access to past/draft revisions.

Although I do agree that the description in #23 describes much better what this permission is currently used/should be used for.

xjm’s picture

Status: Reviewed & tested by the community » Needs work

Thanks for working on this. Node access control has always confused people and maybe we can help fix that.

  1. +++ b/core/modules/node/node.permissions.yml
    @@ -8,7 +8,7 @@ administer content types:
    -  description: 'Promote, change ownership, edit revisions, and perform other tasks across all content types.'
    +  description: 'Change ownership, published time, promote, make sticky and edit past revisions of content, for all content types. Does not include view, edit or delete permissions to users without prior access to the content.'
    

    The first sentence is lacking parallelism, and is therefore very confusing.

    "Change ownership" is a verb with an object. "published time" is a noun. "Promote" is again a verb. "Make sticky and edit past revisions" is not a single concept, yet is written as such. (There's at least a missing serial comma after "sticky"). The second sentence is also unclear -- I don't understand it, and I nominally am a node access system maintainer. ;)

  2. +++ b/core/modules/node/node.permissions.yml
    @@ -20,10 +20,10 @@ view all revisions:
    -  description: 'Role requires permission <em>view revisions</em> and <em>edit rights</em> for nodes in question or <em>administer nodes</em>.'
    +  description: 'Role requires permission to <em>view revisions</em> and <em>edit</em> permission for nodes in question or <em>administer nodes</em>.'
    ...
    -  description: 'Role requires permission to <em>view revisions</em> and <em>delete rights</em> for nodes in question or <em>administer nodes</em>.'
    +  description: 'Role requires permission to <em>view revisions</em> and <em>delete</em> permission for nodes in question or <em>administer nodes</em>.'
    

    This also is missing parallel constructions. At a minimum, the second instance of the word "permission" in each case is redundant. It says currently "Role requires permission... to delete permission".

xjm’s picture

Also, it looks like my feedback in #19 wasn't really ever addressed. Please review both before continuing work on this issue. It should also have a usability review once the obvious problems have been fixed, as I stated back then. :)

berdir’s picture

1. I interpret the first sentence as "Change all, those, things". But agreed that the mix of nouns and actions is confusing, but it's also hard to make nouns for promotedness and stickyness.

I think I mentioned that elsewhere but IMHO, the main reason that it's so hard to describe is that the permission is a mess. It simply covers all the left-overs that weren't access content overview nor bypass node access, back when those two permissions were split away from administer nodes.

If this would be a simple fix then we could do this and then later split it off, but maybe we should actually start by adding dedicated permissions for some of the things it covers, that would make it easier to describe then eventually, although IMHO the goal should eventually be to deprecate the permission entirely. We could start with the revision part. There's already ongoing activity to improve node revision access handling.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

shivam kaushal’s picture

Assigned: Unassigned » shivam kaushal
shivam kaushal’s picture

Assigned: shivam kaushal » Unassigned
Status: Needs work » Needs review
StatusFileSize
new708 bytes
abhijith s’s picture

StatusFileSize
new18.75 KB
new20.55 KB

Applied patch #44 . Now the description seems more meaningful.
Attaching screenshots
Before patch:
before
After patch:
after

RTBC

abhijith s’s picture

Status: Needs review » Reviewed & tested by the community
quietone’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs issue summary update

Thank you to everyone for getting this to RTBC.

I briefly read the issue and noticed that the feedback from xjm in #19 and #41 has not been addressed.

The IS needs an update, the remaining task states that the wording needs to be agreed on which based on the feedback mentioned above that has not happened. This issue requires screenshots so the latest before and after screenshot should be in the Issue Summary. There may be other items in the IS that need updating, I only skimmed it. Adding tag.

Because of the above, setting back to NW.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

vikashsoni’s picture

Applied patch #46 applied successfully
After patch description has been changed in node.permission.yml file
Thanks for the patch

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

acbramley’s picture

Still relevant, #19 and #41 still need actioning. We also need an MR here.

ruuds’s picture

After reading the current description in Drupal 11 I still didn't understand completely what the "administer nodes" permission does. After examining \Drupal\node\NodeAccessControlHandler::checkFieldAccess i did. It still felt strange to me that this is single permission covers all node types. Shouldn't it be split in a permission per node type as is done for the view/edit/etc permissions?

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.