Skip to content

Conversation

@JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Mar 25, 2025

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)

@JammingBen JammingBen self-assigned this Mar 25, 2025
@JammingBen JammingBen force-pushed the fix/collabora-share-view branch from fb76247 to b6ebe3f Compare March 25, 2025 08:32
@JammingBen JammingBen marked this pull request as ready for review March 25, 2025 08:42
@JammingBen JammingBen requested review from Copilot and kulmann March 25, 2025 08:42
Copy link
Contributor

Copilot AI left a 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.
@JammingBen JammingBen force-pushed the fix/collabora-share-view branch from cbd7343 to f76e7d7 Compare March 25, 2025 08:52
@JammingBen JammingBen merged commit e3c2021 into main Mar 25, 2025
9 checks passed
@JammingBen JammingBen deleted the fix/collabora-share-view branch March 25, 2025 09:43
This was referenced Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File with viewer role opens with a watermark in collabora

3 participants