'defaultExpireDateEnforced' => $enforceDefaultExpireDate,
'enforcePasswordForPublicLink' => \OCP\Util::isPublicLinkPasswordRequired(),
'sharingDisabledForUser' => \OCP\Util::isSharingDisabledForUser(),
+ 'resharingAllowed' => \OCP\Share::isResharingAllowed(),
)
)
),
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;
}
}
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) {
*
* 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;
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();
+ }
}
/**