python: edit link only for editable format

This commit is contained in:
Alexandr Fedorov
2021-04-16 16:07:50 +03:00
parent ac4ef8fca5
commit 6ea6e35d54
2 changed files with 42 additions and 39 deletions

View File

@ -173,7 +173,7 @@ def getStoredFiles(req):
for f in files:
if os.path.isfile(os.path.join(directory, f)):
fileInfos.append({ 'type': fileUtils.getFileType(f), 'title': f, 'url': getFileUri(f, True, req) })
fileInfos.append({ 'type': fileUtils.getFileType(f), 'title': f, 'url': getFileUri(f, True, req), 'canEdit': isCanEdit(fileUtils.getFileExt(f))})
return fileInfos