Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_texteditor.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2013-10-07 19:34:01 +0400
committerVincent Petry <pvince81@owncloud.com>2013-10-07 19:34:01 +0400
commitc10606f953ca3866c060f6716e7bfacfea8c76a3 (patch)
tree94f127cf39d02eead7933d025bcabbef8f22d649 /js
parent16de7fdae088959548dff3ce8c5714f1052817dd (diff)
Disable text editor app in public mode when logged in
This fixes #5059 by disabling the text editor app from the JS code, because it's currently not possible to detect public mode from app.php
Diffstat (limited to 'js')
-rw-r--r--js/editor.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/js/editor.js b/js/editor.js
index a3841a3..e0f05d2 100644
--- a/js/editor.js
+++ b/js/editor.js
@@ -304,6 +304,10 @@ function reopenEditor() {
var is_editor_shown = false;
$(document).ready(function () {
+ if ($('#isPublic').val()){
+ // disable editor in public mode (not supported yet)
+ return;
+ }
if (typeof FileActions !== 'undefined') {
FileActions.register('text', 'Edit', OC.PERMISSION_READ, '', function (filename) {
showFileEditor($('#dir').val(), filename);