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

Snapshots: Viewers can not create a Snapshot #84952

Merged
merged 1 commit into from
Mar 22, 2024

Conversation

evictorero
Copy link
Contributor

What is this feature?

This PR removes the ability to create snapshots for users without edit permissions on the dashboard addressing this old feature request.

Frontend

  • Hide the Snapshot tab in the ShareModal for legacy and scene dashboards

Backend

  • Add a permissions validation using a dashboard uid as scope
  • Move payload binding to the API level
  • Add changes to k8s snapshot API to support the same behavior

Use cases

  • Users with viewer role cannot see the Snapshots tab or use the API
  • Users with edit or admin role can create Snapshots for the particular Dashboard
  • Users with viewer role but edit or admin permissions on a particular dashboard can create Snapshots for the particular Dashboard

Fixes #83529

Special notes for your reviewer:

Please check that:

  • It works as expected from a user's perspective.
  • If this is a pre-GA feature, it is behind a feature toggle.
  • The docs are updated, and if this is a notable improvement, it's added to our What's New doc.

@evictorero evictorero merged commit c57c033 into main Mar 22, 2024
26 checks passed
@evictorero evictorero deleted the evictorero/viewers-cannot-create-snapshots branch March 22, 2024 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Task: Disable Snapshot creation for users with viewer permissions
3 participants