From f8717bc26005912f14fb0da52b7dd66f86f3b929 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 21 Oct 2013 11:29:40 +0200 Subject: Fixed share with link checkbox missing as regular user Instead of loading the app config setting "shareapi_allow_links" using a synchronous ajax call that fails when the user is not an admin, this fix puts the flag directly in the template so it doesn't need to be loaded afterwards. Fixes #5440 --- core/js/share.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'core/js') diff --git a/core/js/share.js b/core/js/share.js index 6ec15f01c1e..9c606b9de62 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -203,18 +203,7 @@ OC.Share={ html += ''; html += ''; - var linksAllowed = false; - $.ajax({ - type: 'GET', - url: OC.filePath('core', 'ajax', 'appconfig.php'), - data: { action:'getValue', app:'core', key:'shareapi_allow_links', defaultValue:'yes' }, - async: false, - success: function(result) { - if (result && result.status === 'success' && result.data === 'yes') { - linksAllowed = true; - } - } - }); + var linksAllowed = $('#allowShareWithLink').val() === 'yes'; if (link && linksAllowed) { html += '