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

Add runQueries permissions to policies that require it #2551

Merged

Conversation

mknowlton89
Copy link
Collaborator

@mknowlton89 mknowlton89 commented May 20, 2024

Features and Changes

While doing some testing, I came across a few edge cases.

  1. If a user had the MetricsFullAccess policy, but not the runQueries permission, creating metrics was a bit odd - they could technically edit the SQL, but they would not be able to test the queries.
  2. If the user had the same policies above, they wouldn't be able to refresh the metrics, which is odd considering they had MetricsFullAccess.
  3. If a user had the DatasourceFullAccess they were also able to technically create a datasource, but they couldn't generate an information schema because that requires runQueries permission.
  4. If a user had the DatasourceConfiguration policy, they were technically able to update things like the Experiment Assignment Queries, but again they weren't able to test the queries before saving, nor were they able to update/generate the datasource's information schema.
  5. If a user has the ExperimentFullAccess policy, this also didn't include the runPermissions policy, so they're not able to update an experiment's results.
  6. If a user has the DimensionsFullAccess policy, this doesn't allow the user to build/test the query when creating/editing the dimension.
    1. If a user has the SegmentsFullAccess policy, this doesn't allow the user to build/test the query when creating/editing the segment.

To combat this, I've added the runQueries permission to the following policies: MetricsFullAccess, FactTablesFullAccess, FactMetricsFullAccess, DatasourceFullAccess, DatasourceConfiguration, ExperimentsFullAccess, DimensionsFullAccess, and SegmentsFullAccess.

This PR likely reduces the need for #2550, though, it feels like there may still be edge cases that make 2550 valuable.

@mknowlton89 mknowlton89 changed the title Updates metric & datasource policies to include runQueries Add runQueries permissions to policies that require it May 20, 2024
@mknowlton89 mknowlton89 marked this pull request as ready for review May 20, 2024 15:12
Copy link

Your preview environment pr-2551-bttf has been deployed.

Preview environment endpoints are available at:

@mknowlton89 mknowlton89 merged commit f3f8b8b into main May 20, 2024
4 checks passed
@mknowlton89 mknowlton89 deleted the mk/update-datasourceFullAccess-metricFullAccess-policies branch May 20, 2024 15:58
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

2 participants