Add permissions to allow limitations on which role can execute certain bundle conversions per entity type.

Also limit the allowed actions on entity types with at least 2 bundles.

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

jefuri created an issue. See original summary.

jefuri’s picture

jefuri’s picture

Status: Active » Needs review
jefuri’s picture

Small issue with info.yml, my bad. This one works.

jefuri’s picture

And forgot to remove a debug echo line.

jefuri’s picture

copy paste bug. fixed it.

el1_1el’s picture

Status: Needs review » Needs work

I like this idea.

But the form at /admin/convert_bundles would need to be converted to a dynamic route (/admin/convert_bundles/[entity_type_definition_id]) for it to work though. Im currently getting access denied at that route for users with the "Content: Convert bundle" permission that dont have administer convert_bundles

jefuri’s picture

Title: Permissions per entity type for conversion » Permissions per entity type for conversion, for the action plugins
Status: Needs work » Needs review
StatusFileSize
new10.15 KB

Not necessarily, you could allow the current permission to be the one to rule them all and give access to that form.

The intention for my patch was focused on the actions that can be used in views, not the form. Changed the title now.

In case we want to validate these permissions in the form as well, we could just check the permission before setting the options in the form element. And also validate them when something is chosen in the form validation.

Rerolled the patch to work with latest version of the module.

jefuri’s picture

Opened an MR based on the gitlab fork flow of drupal.

tiagopastor’s picture

Hi, jefuri thank you for you work.
I reloaded the patch because I was getting some errors, when I try convert nodes with non-administrative roles.
So I created a new permission to give to other roles.

Thank you.

joseph.olstad’s picture

Version: 8.x-1.x-dev » 2.0.x-dev

  • joseph.olstad committed 09ead973 on 2.0.x authored by jefuri
    Issue #3048183 by jefuri, tiagopastor, el1_1el: Permissions per entity...

  • joseph.olstad committed bb89c23f on 2.0.x authored by jefuri
    Issue #3048183 by jefuri, tiagopastor, el1_1el: Permissions per entity...
joseph.olstad’s picture

Status: Needs review » Fixed

this will be tagged as 2.0.0-beta1

Status: Fixed » Closed (fixed)

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