Problem/Motivation

As discussed at #2758203: No permissions? for Drupal 7, this module needs permissions so that the setting is not exposed to all content editors.

Issue fork node_class-3266541

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

robcarr created an issue. See original summary.

robcarr’s picture

Status: Active » Needs review
StatusFileSize
new1.41 KB

Patch attached

robcarr’s picture

StatusFileSize
new1.34 KB

Sorry - was in a hurry to post last patch. This one applies correctly.

robcarr’s picture

Status: Needs review » Needs work

Permissions not working correctly

justskew’s picture

Status: Needs work » Needs review
StatusFileSize
new1.17 KB

Fixed

Arturo-q’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new30.96 KB
new20.19 KB

Hi, I've reviewed patch #4, and it fixes the issue, I've tested it locally and now the "Node class setting" tab only appears on the edit node page if the actual user has the new role "Define custom node classes", moving to RTBC.
Regards.

anybody’s picture

Version: 2.0.0 » 2.0.x-dev
Status: Reviewed & tested by the community » Needs work

Please use a MR instead.

anybody’s picture

Priority: Normal » Major

This is a very helpful and important feature.

vitaliyb98 made their first commit to this issue’s fork.

vitaliyb98’s picture

Status: Needs work » Reviewed & tested by the community

Hi, added changes from the patch into the MR. Tested it, works as expected, moved to RTBC

anybody’s picture

Status: Reviewed & tested by the community » Needs work

Thanks @vitaliyb98 - as this is quite widely used, please add an (empty) update hook that informs user about the new permission in its PHPDoc, so they will see the message when updating. Let them know what to do, as this is a breaking change.

vitaliyb98’s picture

Status: Needs work » Needs review

Hi @anybody, thanks for your feedback!

Added hook update with:

/**
 * New permission "Define custom node classes" was introduced.
 *
 * Breaking change: only users with this permission can manage
 * node class settings. Please assign it to appropriate roles.
 */

If you have a better idea for the text, please let me know)

anybody’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @vitaliyb98 I think it's good enough.

anybody’s picture

Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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