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.
Issue fork convert_bundles-3048183
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
Comment #2
jefuri commentedComment #3
jefuri commentedComment #4
jefuri commentedSmall issue with info.yml, my bad. This one works.
Comment #5
jefuri commentedAnd forgot to remove a debug echo line.
Comment #6
jefuri commentedcopy paste bug. fixed it.
Comment #7
el1_1el commentedI 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
Comment #8
jefuri commentedNot 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.
Comment #10
jefuri commentedOpened an MR based on the gitlab fork flow of drupal.
Comment #11
tiagopastor commentedHi, 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.
Comment #12
joseph.olstadComment #15
joseph.olstadthis will be tagged as 2.0.0-beta1