From e6794e015ca31660989ec565f753073e81875572 Mon Sep 17 00:00:00 2001 From: Victor Dubiniuk Date: Fri, 27 Sep 2013 19:54:31 +0300 Subject: [PATCH] Disallow sharing for guests --- js/documents.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/documents.js b/js/documents.js index e577aac2..5e31e90f 100644 --- a/js/documents.js +++ b/js/documents.js @@ -132,7 +132,6 @@ var documentsMain = { prepareGrid : function(){ documentsMain.isEditorMode = false; documentsMain.UI.hideOverlay(); - $(window).off('beforeunload'); }, initSession: function(response) { @@ -152,7 +151,7 @@ var documentsMain = { documentsMain.UI.showEditor( documentsMain.getNameByFileid(response.file_id), - response.permissions & OC.PERMISSION_SHARE + response.permissions & OC.PERMISSION_SHARE && !documentsMain.isGuest ); var serverFactory = new ServerFactory(); @@ -226,6 +225,7 @@ var documentsMain = { return; } documentsMain.isEditorMode = false; + $(window).off('beforeunload'); parent.location.hash = ""; documentsMain.show();