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

Load viewer scripts depending on share ownership #2745

Merged
merged 5 commits into from
Jan 12, 2023

Conversation

juliushaertl
Copy link
Member

@juliushaertl juliushaertl commented Jan 12, 2023

Summary

This changes makes sure that the viewer integration will no longer be loaded for all share links but only for those where the share owner should have access to office. This only applies if office is restricted to by only used by certain groups.

  • refactor: Use existing method to check if users can edit
  • fix: Do not consider guests to be in groups
  • fix: Load viewer depending on share owners on public links
  • fix: Expose capabilities also for guests

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Documentation (manuals or wiki) has been updated or is not required

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@cypress
Copy link

cypress bot commented Jan 12, 2023



Test summary

18 0 0 0


Run details

Project Richdocuments
Status Passed
Commit bb89b79
Started Jan 12, 2023 11:45 AM
Ended Jan 12, 2023 11:48 AM
Duration 02:38 💡
OS Linux Ubuntu -
Browser Electron 106

View run in Cypress Dashboard ➡️


This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@juliushaertl
Copy link
Member Author

e2e tests for this would also be nice to have, but require some more effort. I'll try to work on that on the sides a bit but would be good to get this in already to fix this issue.

@juliushaertl juliushaertl added bug Something isn't working 3. to review Ready to be reviewed labels Jan 12, 2023
@juliushaertl
Copy link
Member Author

/backport to stable25

@juliushaertl
Copy link
Member Author

/backport to stable24

Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

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

Did not try it but looks good.

lib/Capabilities.php Outdated Show resolved Hide resolved
lib/Listener/LoadViewerListener.php Outdated Show resolved Hide resolved
lib/PermissionManager.php Show resolved Hide resolved
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Copy link
Member

@julien-nc julien-nc left a comment

Choose a reason for hiding this comment

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

👍

@juliushaertl juliushaertl merged commit 69e53ee into master Jan 12, 2023
@juliushaertl juliushaertl deleted the bugfix/noid/use-group-public branch January 12, 2023 12:01
@juliushaertl
Copy link
Member Author

/backport to stable25

@juliushaertl
Copy link
Member Author

/backport to stable24

@backportbot-nextcloud
Copy link

The backport to stable25 failed. Please do this backport manually.

@backportbot-nextcloud
Copy link

The backport to stable24 failed. Please do this backport manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Ready to be reviewed bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants