aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_sharing/public.php1
-rw-r--r--core/js/config.php1
-rw-r--r--core/js/share.js4
-rw-r--r--lib/private/share/share.php2
-rw-r--r--lib/public/share.php9
-rw-r--r--settings/js/apps.js3
6 files changed, 16 insertions, 4 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index ec7c80f3316..e64a1f7b127 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -100,6 +100,7 @@ if (isset($path)) {
$file = basename($path);
// Download the file
if (isset($_GET['download'])) {
+ \OC::$server->getSession()->close();
if (isset($_GET['files'])) { // download selected files
$files = urldecode($_GET['files']);
$files_list = json_decode($files);
diff --git a/core/js/config.php b/core/js/config.php
index 0ab74d2949e..b61694522db 100644
--- a/core/js/config.php
+++ b/core/js/config.php
@@ -83,6 +83,7 @@ $array = array(
'defaultExpireDateEnforced' => $enforceDefaultExpireDate,
'enforcePasswordForPublicLink' => \OCP\Util::isPublicLinkPasswordRequired(),
'sharingDisabledForUser' => \OCP\Util::isSharingDisabledForUser(),
+ 'resharingAllowed' => \OCP\Share::isResharingAllowed(),
)
)
),
diff --git a/core/js/share.js b/core/js/share.js
index 14abdf18ade..1b4e519f201 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -488,7 +488,7 @@ OC.Share={
if (possiblePermissions & OC.PERMISSION_DELETE) {
permissions = permissions | OC.PERMISSION_DELETE;
}
- if (possiblePermissions & OC.PERMISSION_SHARE) {
+ if (oc_appconfig.core.resharingAllowed && (possiblePermissions & OC.PERMISSION_SHARE)) {
permissions = permissions | OC.PERMISSION_SHARE;
}
@@ -620,7 +620,7 @@ OC.Share={
}
html += '<label><input type="checkbox" name="mailNotification" class="mailNotification" ' + checked + ' />'+t('core', 'notify by email')+'</label> ';
}
- if (possiblePermissions & OC.PERMISSION_SHARE) {
+ if (oc_appconfig.core.resharingAllowed && (possiblePermissions & OC.PERMISSION_SHARE)) {
html += '<label><input type="checkbox" name="share" class="permissions" '+shareChecked+' data-permissions="'+OC.PERMISSION_SHARE+'" />'+t('core', 'can share')+'</label>';
}
if (possiblePermissions & OC.PERMISSION_CREATE || possiblePermissions & OC.PERMISSION_UPDATE || possiblePermissions & OC.PERMISSION_DELETE) {
diff --git a/lib/private/share/share.php b/lib/private/share/share.php
index 450c71cf8a2..b8e7ffa4536 100644
--- a/lib/private/share/share.php
+++ b/lib/private/share/share.php
@@ -1114,7 +1114,7 @@ class Share extends \OC\Share\Constants {
*
* Resharing is allowed by default if not configured
*/
- private static function isResharingAllowed() {
+ public static function isResharingAllowed() {
if (!isset(self::$isResharingAllowed)) {
if (\OC_Appconfig::getValue('core', 'shareapi_allow_resharing', 'yes') == 'yes') {
self::$isResharingAllowed = true;
diff --git a/lib/public/share.php b/lib/public/share.php
index c0939dce53f..e6519dd3e3a 100644
--- a/lib/public/share.php
+++ b/lib/public/share.php
@@ -330,6 +330,15 @@ class Share extends \OC\Share\Constants {
public static function checkPasswordProtectedShare(array $linkItem) {
return \OC\Share\Share::checkPasswordProtectedShare($linkItem);
}
+
+ /**
+ * Check if resharing is allowed
+ *
+ * @return boolean true if allowed or false
+ */
+ public static function isResharingAllowed() {
+ return \OC\Share\Share::isResharingAllowed();
+ }
}
/**
diff --git a/settings/js/apps.js b/settings/js/apps.js
index 877ad78cfe4..e808e51e936 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -237,7 +237,8 @@ OC.Settings.Apps = OC.Settings.Apps || {
element.val(t('settings','Uninstall'));
} else {
OC.Settings.Apps.removeNavigation(appid);
- appitem.removeClass('active');
+ var appItem = $('#app-navigation li').filterAttr('data-id', appid);
+ appItem.removeClass('active');
}
},'json');
},