summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-06-05 17:23:42 +0200
committerVincent Petry <pvince81@owncloud.com>2014-06-05 17:23:42 +0200
commit1c598085176e4bef12f5fbcd221ef6b832b734bb (patch)
treeedf58b2d3ed7e4fa4e187740ecf01485098a792b /settings
parent4b650a20a42b70412cee9dd835e096e16da6d530 (diff)
parent6578f00b4bcfbd5bc44bc12e341506f922498d7b (diff)
downloadnextcloud-server-1c598085176e4bef12f5fbcd221ef6b832b734bb.tar.gz
nextcloud-server-1c598085176e4bef12f5fbcd221ef6b832b734bb.zip
Merge pull request #8865 from owncloud/improve_share_settings
Improve share settings
Diffstat (limited to 'settings')
-rwxr-xr-xsettings/admin.php2
-rw-r--r--settings/js/admin.js3
-rw-r--r--settings/templates/admin.php22
3 files changed, 10 insertions, 17 deletions
diff --git a/settings/admin.php b/settings/admin.php
index d2be04fcd1d..dd1c604edb1 100755
--- a/settings/admin.php
+++ b/settings/admin.php
@@ -83,7 +83,7 @@ $tmpl->assign('enforceLinkPassword', \OCP\Util::isPublicLinkPasswordRequired());
$tmpl->assign('allowPublicUpload', OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes'));
$tmpl->assign('allowResharing', OC_Appconfig::getValue('core', 'shareapi_allow_resharing', 'yes'));
$tmpl->assign('allowMailNotification', OC_Appconfig::getValue('core', 'shareapi_allow_mail_notification', 'no'));
-$tmpl->assign('sharePolicy', OC_Appconfig::getValue('core', 'shareapi_share_policy', 'global'));
+$tmpl->assign('onlyShareWithGroupMembers', \OC\Share\Share::shareWithGroupMembersOnly());
$tmpl->assign('forms', array());
foreach($forms as $form) {
$tmpl->append('forms', $form);
diff --git a/settings/js/admin.js b/settings/js/admin.js
index 8c7572fa394..bc95c6a3dc5 100644
--- a/settings/js/admin.js
+++ b/settings/js/admin.js
@@ -83,9 +83,6 @@ $(document).ready(function(){
$('#allowLinks').change(function() {
$("#publicLinkSettings").toggleClass('hidden', !this.checked);
});
- $('#allowResharing').change(function() {
- $("#resharingSettings").toggleClass('hidden', !this.checked);
- });
$('#security').change(function(){
$.post(OC.filePath('settings','ajax','setsecurity.php'), { enforceHTTPS: $('#forcessl').val() },function(){} );
diff --git a/settings/templates/admin.php b/settings/templates/admin.php
index 8ed22e98b52..ce33a804f54 100644
--- a/settings/templates/admin.php
+++ b/settings/templates/admin.php
@@ -237,15 +237,14 @@ if (!$_['internetconnectionworking']) {
<td id="enable">
<input type="checkbox" name="shareapi_enabled" id="shareAPIEnabled"
value="1" <?php if ($_['shareAPIEnabled'] === 'yes') print_unescaped('checked="checked"'); ?> />
- <label for="shareAPIEnabled"><?php p($l->t('Enable Share API'));?></label><br/>
- <em><?php p($l->t('Allow apps to use the Share API')); ?></em>
+ <label for="shareAPIEnabled"><?php p($l->t('Allow apps to use the Share API'));?></label><br/>
</td>
</tr>
<tr>
<td <?php if ($_['shareAPIEnabled'] === 'no') print_unescaped('class="hidden"');?>>
<input type="checkbox" name="shareapi_allow_links" id="allowLinks"
value="1" <?php if ($_['allowLinks'] === 'yes') print_unescaped('checked="checked"'); ?> />
- <label for="allowLinks"><?php p($l->t('Allow links'));?></label><br/>
+ <label for="allowLinks"><?php p($l->t('Allow users to share via link'));?></label><br/>
<div <?php ($_['allowLinks'] === 'yes') ? print_unescaped('class="indent"') : print_unescaped('class="hidden indent"');?> id="publicLinkSettings">
<input type="checkbox" name="shareapi_enforce_links_password" id="enforceLinkPassword"
value="1" <?php if ($_['enforceLinkPassword']) print_unescaped('checked="checked"'); ?> />
@@ -268,7 +267,6 @@ if (!$_['internetconnectionworking']) {
</div>
</div>
- <em><?php p($l->t('Allow users to share items to the public with links')); ?></em>
</td>
</tr>
<tr>
@@ -276,15 +274,13 @@ if (!$_['internetconnectionworking']) {
<input type="checkbox" name="shareapi_allow_resharing" id="allowResharing"
value="1" <?php if ($_['allowResharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
<label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/>
- <em><?php p($l->t('Allow users to share items shared with them again')); ?></em>
- <div id="resharingSettings" <?php ($_['allowResharing'] === 'yes') ? print_unescaped('class="indent"') : print_unescaped('class="hidden indent"');?>>
- <input type="radio" name="shareapi_share_policy" id="sharePolicyGlobal"
- value="global" <?php if ($_['sharePolicy'] === 'global') print_unescaped('checked="checked"'); ?> />
- <label for="sharePolicyGlobal"><?php p($l->t('Allow users to share with anyone')); ?></label><br/>
- <input type="radio" name="shareapi_share_policy" id="sharePolicyGroupsOnly"
- value="groups_only" <?php if ($_['sharePolicy'] === 'groups_only') print_unescaped('checked="checked"'); ?> />
- <label for="sharePolicyGroupsOnly"><?php p($l->t('Allow users to only share with users in their groups'));?></label><br/>
- </div>
+ </td>
+ </tr>
+ <tr>
+ <td <?php if ($_['shareAPIEnabled'] === 'no') print_unescaped('class="hidden"');?>>
+ <input type="checkbox" name="shareapi_only_share_with_group_members" id="onlyShareWithGroupMembers"
+ 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/>
</td>
</tr>
<tr>