- Issue created by @tanc
- 🇮🇹Italy tanc Italy
I've pushed the solution to the issue fork, but its been a year or so since I tried to use the gitlab integration so I'm not sure how to issue a merge request
Does someone mind taking a look? https://git.drupalcode.org/issue/geo_entity-3528161/-/commit/7d29acd1561...
- 🇳🇱Netherlands ekes
Just logging review messages:
- Lots of nice code tidy up, the JS for sure needs it, but makes it harder to read the substantive changes. The YML for sure has inconsistent ' ".
- Upgrade path should probably be in a post_update hook as it's working on loaded entities.
- Does it also drop the 'administer geo' permission meaning that a user can update, delete (but leave it for create)?
- 🇮🇹Italy tanc Italy
Have added a new MR which should be way easier to review, sorry got carried away with the cleanup
https://git.drupalcode.org/project/geo_entity/-/merge_requests/14/diffs#...
It actually adds the
administer geo
permission which was referenced in the earlier code but not actually provided as a permission. This gives rights to do anything, whenever there is an access check run. - 🇳🇱Netherlands ekes
!14 is easier to read :-) Still would be good to get that JS cleanup though.
Administer permission I'd overlooked the early return. Makes sense. - 🇮🇹Italy tanc Italy
Have pushed a change with the suggested post_update hook.
I can merge in the code cleanup later after the review of the core functionality.
- 🇬🇧United Kingdom andybroomfield
Just testing this with BHCC site. I'm testing MR 14.
On default Localgov Drupal I see the permissions update.
Before:
After:
- 🇬🇧United Kingdom andybroomfield
Have tested this on BHCC site and geo entities remain editable.
Was able to change the permission to edit and delete own and those functions where only possible on Geo entities a user was the author.
I noticed a weird side effect which is when a geo entity that a user can view but not edit, when trying to edit in the entity browser, it removes it from the selection and switches to replace mode, instead of the opening up the editor. I guess this is intended behaviour (and from entity browser anyway).My only further thoughts are if we need per bundle permissions. As we now have quite a few Geo bundles (mostly for connecting and importing the data from ArcGis). So generally we would not want normal Drupal editors to have permission to delete those. Happy for that to be an advanced permission sub module.
- 🇳🇱Netherlands ekes
My only further thoughts are if we need per bundle permissions. As we now have quite a few Geo bundles (mostly for connecting and importing the data from ArcGis). So generally we would not want normal Drupal editors to have permission to delete those. Happy for that to be an advanced permission sub module.
I'd that sounds reasonable, so making another issue / PR would make sense. Another suggestion (not for create so much as edit) was if the user had access to an entity referencing the geo entity... although as we don't have back references I suspect that might be too complicated.
-
finn lewis →
committed fc07cf1e on 1.0.x authored by
tanc →
Resolve #3528161
-
finn lewis →
committed fc07cf1e on 1.0.x authored by
tanc →
- 🇬🇧United Kingdom finn lewis Oxford
andybroomfield → credited finn lewis → .
Automatically closed - issue fixed for 2 weeks with no activity.