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

feat: hide version panel with insufficient permissions #11484

Merged
merged 1 commit into from
Sep 5, 2024

Conversation

JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Aug 30, 2024

Description

Users that have insufficient permissions to view file versions don't see the version sidebar panel anymore. This currently affects regular share receivers, space viewers and space editors without the versions/read permission.

Also introduces a helper useCanListVersions.

To enable Space Viewers without version permissions, start the latest oCIS with this env var: GRAPH_AVAILABLE_ROLES="b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5,a8d5fe5e-96e3-418d-825b-534dbdf22b99,fb6c3e19-e378-47e5-b277-9732f9de6e21,58c63c02-1d89-4572-916a-870abc5a1b7d,2d00ce52-1fc2-4dbc-8b95-a73b73395f5a,1c996275-f1c9-4e71-abdf-a42f6495e960,312c0871-5ef7-4b3a-85b6-0e4074c64049,aa97fe03-7980-45ac-9e50-b325749fd7e6,3284f2d5-0070-4ad8-ac40-c247f7c1fb27"

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

@JammingBen JammingBen self-assigned this Aug 30, 2024
@JammingBen JammingBen force-pushed the feat/no-versions-editor-role branch 2 times, most recently from 8501a9a to 19a3469 Compare August 30, 2024 12:44
@JammingBen JammingBen marked this pull request as ready for review August 30, 2024 13:19
Copy link
Contributor

@kulmann kulmann left a comment

Choose a reason for hiding this comment

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

Works like a charm, thank you!

Added a comment with a tiny code style nitpick 😁

Users that have insufficient permissions to view file versions don't see the version sidebar panel anymore. This currently affects regular share receivers, space viewers and space editors without the `versions/read` permission.
@JammingBen JammingBen force-pushed the feat/no-versions-editor-role branch from 19a3469 to 9c4a40a Compare September 5, 2024 11:03
Copy link

sonarqubecloud bot commented Sep 5, 2024

@JammingBen JammingBen merged commit 867f474 into master Sep 5, 2024
3 checks passed
@kulmann kulmann deleted the feat/no-versions-editor-role branch September 5, 2024 19:46
@micbar micbar mentioned this pull request Sep 12, 2024
18 tasks
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.

[Web] Hide versions panel if versions are not shared
3 participants