Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 113: Granting 'create geo' and 'access geo_entity_library entity browser pages' permissions #121

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

MariosORION
Copy link
Contributor

PR for issue #113.

Description of changes:

  • Adding the 'create geo' and 'access geo_entity_library entity browser pages' permissions to the default set for the Contributor role too, in .localgov_geo.module.
  • Update hook in localgov_geo.install: Grant 'create geo' and 'access geo_entity_library entity browser pages' permissions to Editor, Author and Contributor roles.

@finnlewis
Copy link
Member

Discussing in Merge Tuesday.

In general we try to avoid updating permissions with update hooks.

@willguv points out that this is an oversight, we did not give the permission to the contributor role.

@ekes outlines an edge case where people might be able to create locations outside of a workflow.

@stephen-cox thinks it is likely that most sites have fixed this.

Asking those in the room if there are any objections to releasing updates to permission: none.

So: I will test and assuming it does work as expected, will merge and tag a release.

THanks @MariosORION !

@finnlewis finnlewis self-assigned this Jun 11, 2024
@andybroomfield
Copy link
Contributor

Thinking about it, this permissions is just about can they use the entity browser which is only avalible if they can edit the field. The change is small enough that it's worth going ahead. May even be safe to add to the authenticated user role? Thiough in this case the hook to update the default permissions and a release note addressing the why should be sufficent on the off chance someone needs to turn them off.

@ekes
Copy link
Member

ekes commented Jun 17, 2024

Thinking about it, this permissions is just about can they use the entity browser which is only avalible if they can edit the field.

And more importantly my edge case falls out because you still need to give permision to create. You can still re-use with the library without create permission. There is also a follow-up about create with workflow. localgovdrupal/localgov#728

Copy link
Member

@finnlewis finnlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @MariosORION !

@finnlewis finnlewis merged commit 0b49821 into 2.x Jun 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants