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

Disable reverting versions for read-only shares #8040

Merged

Conversation

JammingBen
Copy link
Collaborator

@JammingBen JammingBen commented Nov 29, 2022

Description

Reverting versions for read-only shares is no longer possible.

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

@JammingBen JammingBen self-assigned this Nov 29, 2022
Comment on lines +80 to +86
if (this.highlightedFile.permissions !== undefined) {
return this.highlightedFile.permissions.includes(DavPermission.Updateable)
}

if (this.highlightedFile.share?.role) {
return this.highlightedFile.share.role.hasPermission(SharePermissions.update)
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fyi: Both cases are needed unfortunately because highlightedFile can be a normal or a share resource. Maybe we should streamline all that permission-stuff some day... took me quite a while to get through all this.

@JammingBen JammingBen force-pushed the disable-reverting-versions-for-read-only-shares branch from 0200140 to c49bd42 Compare November 29, 2022 14:07
@sonarcloud
Copy link

sonarcloud bot commented Nov 29, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

66.7% 66.7% Coverage
0.0% 0.0% Duplication

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.

3 participants