Files
ocis/changelog/unreleased/fix-wopi-lock-read-only-view-mode.md
Julian Koberg 8e8041ac8b fix(collaboration): [OCISDEV-781] return 200 OK for WOPI Lock in read-only modes
OnlyOffice sends a WOPI Lock request on document open regardless of whether
the user has write access. The Lock handler was calling SetLock with a
read-only CS3 token, which returned a permission error propagated as HTTP 500
to OnlyOffice, causing an error dialog on load.

Return 200 OK immediately for READ_ONLY and VIEW_ONLY view modes without
acquiring a CS3 lock.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Julian Koberg <julian.koberg@kiteworks.com>
2026-04-24 13:15:33 +02:00

583 B

Bugfix: Return 200 OK for WOPI Lock requests in read-only and view-only modes

OnlyOffice sends a WOPI Lock request when opening any document, even when the user only has read access. The WOPI Lock handler was attempting to acquire a CS3 write lock regardless of the view mode, causing a permission error for read-only tokens that OnlyOffice displayed as an error message on load.

The Lock handler now returns 200 OK immediately for READ_ONLY and VIEW_ONLY view modes without attempting to acquire a lock, consistent with the WOPI spec.

https://github.com/owncloud/ocis/pull/12257