loolwsd: wsd-21569-21572 0:40:13.180582[ client_ws_000a ] TRC WOPI::CheckFileInfo header for URI [https://kolab.example.org/wopi/files/o4myN599gzxdMuAKJN6q11?access_token=a5nTINdXDk4EasAFVrgfy35C0Q&permission=edit]: loolwsd: Date: Thu, 03 Nov 2016 08:10:59 GMT / #011Server: Cowboy / #011content-length: 241 / #011cache-control: max-age=0, private, must-revalidate / #011content-type: application/json; charset=utf-8 / #011Connection: close / loolwsd: wsd-21569-21572 0:40:13.180688 [ client_ws_000a ] DBG WOPI::CheckFileInfo returned: {"Version":"1476791439","UserId":"test.test@example.org","UserFriendlyName":"Test,Test","UserCanWrite":true,"Size":18595,"PostMessageOrigin":"https://office.example.org","OwnerId":"test.test@example.org","BaseFileName":"test.odt"}. Call duration: 0.521516s loolwsd: wsd-21569-21572 0:40:13.180880 [ client_ws_000a ] DBG Setting the session as readonly loowsd-1.9.6-1. p.s. also note "&permission=edit" which is not described in WOPI protocol, though redundant.
I also see "Document saved" notice in the editor bottom toolbar, which does not make sense for readonly session. This might be another issue.
richdocuments passes "UserCanWrite":"true" instead of "UserCanWrite":true and it works. So we receive a string instead of a boolean, maybe it's wrong. See: https://cgit.freedesktop.org/libreoffice/online/tree/loolwsd/Storage.cpp#n335
I'm not 100% sure but spec says Boolean. http://wopi.readthedocs.io/projects/wopirest/en/latest/files/CheckFileInfo.html?highlight=permission#term-usercanwrite
Thanks for the report =)
Pranav Kant committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/online/commit/?id=dacf16f2d85d2fb5a4de8da52ce64b6409a7dbcd tdf#103671: 'true' -> true