-
Notifications
You must be signed in to change notification settings - Fork 25
fix(external): shared files opening with secure view #418
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
Conversation
fb76247 to
b6ebe3f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue where shared files opening in the "view" role erroneously display the secure view watermark and adjusts the Collabora configuration for the dev setup.
- Introduces a helper function to manually set current user permissions on shared spaces.
- Updates docker-compose environment variables and the Collabora image version.
- Refactors and updates related imports and view mode logic in the external app.
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/web-pkg/src/helpers/spaces/permissions.ts | New helper to set user share space permissions based on drive item data. |
| packages/web-pkg/src/helpers/spaces/index.ts | Exports the new permissions helper. |
| docker-compose.yml | Updates environment variables for secure view and adjusts the Collabora image version. |
| packages/web-pkg/src/helpers/index.ts | Includes new module export for spaces. |
| packages/web-pkg/src/services/folder/loaders/loaderSpace.ts | Removes duplicate permission-setting logic; now uses the helper function. |
| packages/web-app-external/src/App.vue | Converts to script setup, refines view mode logic, and adds a loading spinner. |
Files not reviewed (1)
- packages/web-app-external/tests/unit/snapshots/app.spec.ts.snap: Language not supported
Comments suppressed due to low confidence (2)
packages/web-pkg/src/helpers/spaces/permissions.ts:37
- [nitpick] Consider renaming the inner variable 'permissions' (e.g. to 'rolePermissionsList') to avoid shadowing the outer 'permissions' variable and improve clarity.
const permissions = role.rolePermissions.flatMap((p) => p.allowedResourceActions)
docker-compose.yml:181
- The Collabora image version was downgraded from 24.04.12.4.1 to 24.04.12.2.1; please confirm that this change is intentional and that it won't adversely affect the dev setup.
image: collabora/code:24.04.12.2.1
Fixes an issue where files that where shared with the "view" role had the secure view watermark.
cbd7343 to
f76e7d7
Compare
Fixes an issue where files that where shared with the "view" role had the secure view watermark. Also fixes Collabora in our dev setup.
This PR is best reviewed by commits.
fixes opencloud-eu/opencloud#273 (comment)