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

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@owncloud.com>2016-03-18 18:23:33 +0300
committerRoeland Jago Douma <rullzer@owncloud.com>2016-03-22 14:36:59 +0300
commit4d8c81a2d9ddfcab56d50691fa3cd36c9add8978 (patch)
tree500652d9f9eee654ec166b445c57cb9a939d9ebe /settings
parentae2c207b6e9c937b26a00aa786d6517897304d51 (diff)
Add `allow sharing with groups` checkbox to admin page
Diffstat (limited to 'settings')
-rw-r--r--settings/admin.php1
-rw-r--r--settings/js/admin.js4
-rw-r--r--settings/templates/admin.php5
3 files changed, 10 insertions, 0 deletions
diff --git a/settings/admin.php b/settings/admin.php
index 2364fb3aae0..e0d3a907f47 100644
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -129,6 +129,7 @@ $template->assign('allowPublicMailNotification', $appConfig->getValue('core', 's
$template->assign('allowMailNotification', $appConfig->getValue('core', 'shareapi_allow_mail_notification', 'no'));
$template->assign('allowShareDialogUserEnumeration', $appConfig->getValue('core', 'shareapi_allow_share_dialog_user_enumeration', 'yes'));
$template->assign('onlyShareWithGroupMembers', \OC\Share\Share::shareWithGroupMembersOnly());
+$template->assign('allowGroupSharing', $appConfig->getValue('core', 'shareapi_allow_group_sharing', 'yes'));
$databaseOverload = (strpos(\OCP\Config::getSystemValue('dbtype'), 'sqlite') !== false);
$template->assign('databaseOverload', $databaseOverload);
$template->assign('cronErrors', $appConfig->getValue('core', 'cronErrors'));
diff --git a/settings/js/admin.js b/settings/js/admin.js
index 90b1de68370..1bbb20efa00 100644
--- a/settings/js/admin.js
+++ b/settings/js/admin.js
@@ -161,6 +161,10 @@ $(document).ready(function(){
});
});
+ $('#allowGroupSharing').change(function() {
+ $('#allowGroupSharing').toggleClass('hidden', !this.checked);
+ });
+
$('#shareapiExcludeGroups').change(function() {
$("#selectExcludedGroups").toggleClass('hidden', !this.checked);
});
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index a51b9aa16e2..2f4461589da 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -240,6 +240,11 @@ if ($_['cronErrors']) {
<label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/>
</p>
<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
+ <input type="checkbox" name="shareapi_allow_group_sharing" id="allowGroupSharing" class="checkbox"
+ value="1" <?php if ($_['allowGroupSharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
+ <label for="allowGroupSharing"><?php p($l->t('Allow sharing with groups'));?></label><br />
+ </p>
+ <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
<input type="checkbox" name="shareapi_only_share_with_group_members" id="onlyShareWithGroupMembers" class="checkbox"
value="1" <?php if ($_['onlyShareWithGroupMembers']) print_unescaped('checked="checked"'); ?> />
<label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups'));?></label><br/>