Closed andybroomfield closed 10 months ago
So it seems we weren't giving anyone permission to access the entity browser, which is confusing https://github.com/localgovdrupal/localgov_geo/blob/1.x/localgov_geo.module#L109 But we should. So I'd like to extend this a bit.
On a new install I assume we should be giving the permission access geo_entity_library entity browser pages
to 'Editor' 'Author' roles.
@andybroomfield does that make sense?
Then in addition for upgrading sites we should see if it's possible to load the permissions for all roles. See if access localgov_geo_library entity browser pages
is assigned, remove it and replace it with access geo_entity_library entity browser pages
.
Hi Ekes, this came up during manual testing of our site on last Friday. Editors were seeing a permission denied type message in the Geo browser while testing directories. Later I assigned the permissions manually. I thought this issue was specific to our site and so didn't report here!
Yeah, I think a hook_roles on install is appropriate, checking which geo types are installed. And in the localgov_geo_update try to check and update permissions, or add as documentation.
Sorry, forgot to mention that I manually assigned the access geo_entity_library entity browser pages
permission to all the roles that previously had the 'access localgov_geo_library entity browser pages' permission.
This is relates to https://www.drupal.org/node/3193348#comment-14969643
But our issue is perhaps more specific and we can fix with a more simple solution.
Tasks:
Write an update hook to find all roles with the permission to replace
access localgov_geo_library entity browser pages
with access geo_entity_library entity browser pages
.
@alexburrows did you say you might have time to look at this?
Discussing in Merge Monday, we think we'll cover this with docs and release notes.
Release notes should read 👍
"There is a new permission that you will need to grant to your content editor roles: 'access localgov_geo_library entity browser pages'. Please review your permissions after upgrading.
We've done this with documentation, but @andybroomfield might look at an update hook or set some default config in localgov_geo.
Following seen during update
This is easily resolved by setting the correct permissions for the geo_entity browser, someting to add to documentation as I don't think any permissions are set.