mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
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>
583 B
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.