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

[full-ci] Add support for a public link permission #8541

Merged
merged 2 commits into from
Mar 6, 2023

Conversation

JammingBen
Copy link
Contributor

Description

Add support for the public link permission PublicLink.Write.all. Users without this permission won't be able to create public links (except for oC10 instances where this permission is being set implicitly).

Related Issue

Screenshots (if appropriate):

image

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 Mar 6, 2023
@JammingBen JammingBen force-pushed the public-link-permission branch from e966f63 to 9e5cf26 Compare March 6, 2023 12:54
@ownclouders
Copy link
Contributor

Results for acceptance oCIS https://drone.owncloud.com/owncloud/web/33332/69/1

💥 The acceptance tests failed on retry. Please find the screenshots inside ...

webUISharingPublicManagement-shareByPublicLink_feature-L83.png

webUISharingPublicManagement-shareByPublicLink_feature-L83.png

💥 The oCISSharingPublic2 tests pipeline failed. The build has been cancelled.

@JammingBen JammingBen changed the title Add support for a public link permission [full-ci] Add support for a public link permission Mar 6, 2023
@JammingBen JammingBen force-pushed the public-link-permission branch 2 times, most recently from 2e6c442 to 858e6ef Compare March 6, 2023 13:33
@JammingBen JammingBen force-pushed the public-link-permission branch from 858e6ef to 1fd71f2 Compare March 6, 2023 13:47
@sonarcloud
Copy link

sonarcloud bot commented Mar 6, 2023

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

63.8% 63.8% Coverage
0.0% 0.0% Duplication

try {
const {
data: { permissions }
} = await httpClient.post('/api/v0/settings/permissions-list', { account_uuid: user.uuid })
return permissions || []
return permissions || oC10DefaultPermissions
Copy link
Member

Choose a reason for hiding this comment

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

Why not keep the fallback to [] if the call succeeds? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because the call actually succeeds with oC10. It just doesn't return permissions the way we want.

Copy link
Member

Choose a reason for hiding this comment

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

:trollface:

@kulmann kulmann merged commit 64b559b into master Mar 6, 2023
@delete-merged-branch delete-merged-branch bot deleted the public-link-permission branch March 6, 2023 16:28
@micbar micbar mentioned this pull request May 3, 2023
89 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] Respect "create-public-links" permission
3 participants