Skip to content
Snippets Groups Projects
Commit 8e937300 authored by uhensler's avatar uhensler
Browse files

OO-4185: Avoid error when editing a newly created file in ONLYOFFICE

parent 8a7bb136
No related branches found
No related tags found
No related merge requests found
......@@ -76,7 +76,7 @@ public class OnlyOfficeServiceImpl implements OnlyOfficeService {
private static final Logger log = Tracing.createLoggerFor(OnlyOfficeServiceImpl.class);
private static final String LOCK_APP_NAME = "onlyoffice";
private static final DateFormat LAST_MODIFIED = new SimpleDateFormat("yyyyMMddHHmmSS");
private static final DateFormat LAST_MODIFIED = new SimpleDateFormat("yyyyMMddHHmmss");
private static ObjectMapper mapper = new ObjectMapper();
......@@ -223,6 +223,8 @@ public class OnlyOfficeServiceImpl implements OnlyOfficeService {
@Override
public boolean canUpdateContent(VFSLeaf vfsLeaf, Identity identity, String documentKey) {
String currentDocumentKey = getDocumentKey(vfsLeaf.getMetaInfo());
log.debug("ONLYOFFICE currentDokumentKey: {}", currentDocumentKey);
log.debug("ONLYOFFICE documentKey: {}", documentKey);
return currentDocumentKey.equals(documentKey) && !isLockedForMe(vfsLeaf, identity);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment