- First commit to issue fork.
- Open on Drupal.org βCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
12 months ago Waiting for branch to pass - Status changed to Needs review
12 months ago 7:50am 5 December 2023 - πΊπ¦Ukraine AstonVictor
Created a new MR.
Added edit/clone/delete permissions and implemented custom access callbacks for routes that check both the permission and entity access.
Note that all new permissions are disabled by default. So, after merging changes, all contextual links will by hidden.
I guess it's better to merge changes to the next release e.g. 4.0.x - Open on Drupal.org βCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
12 months ago Waiting for branch to pass - π³π±Netherlands bbrala Netherlands
Hmm, yeah that is kinda breaking then. Wouldnt the correct path be adding an upgrade hook that adds the permission to the roles currently having that permission? Then its non breaking and can be disabled if you like.
- π©πͺGermany axroth Stuttgart
+ 1 for the permission approach with update hook
- Open on Drupal.org βCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
10 months ago Waiting for branch to pass - πΊπ¦Ukraine AstonVictor
Implemented an update hook to set permissions for users with
authenticated
role. - Status changed to Needs work
4 months ago 9:24am 12 July 2024 - π³π±Netherlands bbrala Netherlands
Tryinig to get through all issues.
Should the permission migration be different? Wouldnt the user need like content edit permsissions, the authenticated role seems a little optimistic, this could also be a user that can just login to comment or something?
- π¬π§United Kingdom joehuggans Harrogate, UK
For the time-being, if anyone wants to disable the contextual link to the clone form, then using this in a custom module works. (You have to log out and back in and possibly clear cache for it to take effect)
/** * Implements hook_contextual_links_alter(). */ function MODULE_contextual_links_alter(array &$links, $group, array $route_parameters) { if ($group == 'paragraph') { if (isset($links['paragraphs_edit.clone_form'])) { unset($links['paragraphs_edit.clone_form']); } } }