editors: permisions modifyFilter

This commit is contained in:
Sergey Linnik
2017-10-19 16:15:39 +03:00
parent 02afb13601
commit 983c8829fa
4 changed files with 6 additions and 1 deletions

View File

@ -596,9 +596,10 @@ app.get("/editor", function (req, res) {
key: key,
token: "",
callbackUrl: docManager.getCallback(fileName),
isEdit: canEdit && mode == "edit",
isEdit: canEdit && (mode == "edit" || mode == "filter"),
review: mode == "edit" || mode == "review",
comment: mode != "view" && mode != "embedded",
modifyFilter: mode != "filter",
mode: canEdit && mode != "view" ? "edit" : "view",
canBackToFolder: type != "embedded",
backUrl: docManager.getServerUrl(),

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 B

View File

@ -16,6 +16,7 @@
"comment": <%- editor.comment %>,
"download": true,
"edit": <%- editor.isEdit %>,
"modifyFilter": <%- editor.modifyFilter %>,
"review": <%- editor.review %>
}
},

View File

@ -158,6 +158,9 @@
<% if (storedFiles[i].documentType == "text") { %>
<a href="editor?type=desktop&mode=review&fileName=<%= encodeURIComponent(storedFiles[i].name) + params %>" target="_blank">
<img src="images/review-24.png" alt="Open in editor for review" title="Open in editor for review" /></a>
<% } else if (storedFiles[i].documentType == "spreadsheet") { %>
<a href="editor?type=desktop&mode=filter&fileName=<%= encodeURIComponent(storedFiles[i].name) + params %>" target="_blank">
<img src="images/filter-24.png" alt="Open in editor without access to change the filter" title="Open in editor without access to change the filter" /></a>
<% } %>
</td>
<td class="contentCells contentCells-shift contentCells-icon">