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

github.com/nextcloud/circles.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2020-10-02 14:07:55 +0300
committerGitHub <noreply@github.com>2020-10-02 14:07:55 +0300
commit5b9a71ab9e2325bc549d38abd80371ac01086d97 (patch)
tree0032fcb09d3afddf795061c2c411bc6e5eff2a4e
parent89a90c66d1e94b7998cc22f0740639f1957f5cc6 (diff)
parentffd9f497e259f9303058bdf3696bbea3fd150869 (diff)
Merge pull request #492 from nextcloud/backport/491/master
[master] disable federated circles
-rw-r--r--js/admin.js34
-rw-r--r--lib/Controller/SettingsController.php5
-rw-r--r--templates/settings.admin.php7
3 files changed, 13 insertions, 33 deletions
diff --git a/js/admin.js b/js/admin.js
index 7b248c49..30e77984 100644
--- a/js/admin.js
+++ b/js/admin.js
@@ -33,12 +33,11 @@ var elements = {
// test_async_wait: null,
members_limit: null,
allow_linked_groups: null,
- allow_federated_circles: null,
skip_invitation_to_closed_circles: null
};
-$(document).ready(function () {
+$(document).ready(function() {
// elements.test_async_start = $('#test_async_start');
// elements.test_async_reset = $('#test_async_reset');
@@ -46,7 +45,6 @@ $(document).ready(function () {
// elements.test_async_result = $('#test_async_result');
elements.members_limit = $('#members_limit');
elements.allow_linked_groups = $('#allow_linked_groups');
- elements.allow_federated_circles = $('#allow_federated_circles');
elements.skip_invitation_to_closed_circles = $('#skip_invitation_to_closed_circles');
// elements.test_async_wait.hide().on('click', function () {
@@ -71,24 +69,19 @@ $(document).ready(function () {
// });
// });
- elements.members_limit.on('change', function () {
+ elements.members_limit.on('change', function() {
saveChange();
});
- elements.allow_linked_groups.on('change', function () {
+ elements.allow_linked_groups.on('change', function() {
saveChange();
});
-
- elements.allow_federated_circles.on('change', function () {
+ elements.skip_invitation_to_closed_circles.on('change', function() {
saveChange();
});
- elements.skip_invitation_to_closed_circles.on('change', function () {
- saveChange();
- });
-
- saveChange = function () {
+ saveChange = function() {
$.ajax({
method: 'POST',
url: OC.generateUrl('/apps/circles/admin/settings'),
@@ -96,34 +89,31 @@ $(document).ready(function () {
members_limit: elements.members_limit.val(),
allow_linked_groups: (elements.allow_linked_groups.is(
':checked')) ? '1' : '0',
- allow_federated_circles: (elements.allow_federated_circles.is(
- ':checked')) ? '1' : '0',
skip_invitation_to_closed_circles: (elements.skip_invitation_to_closed_circles.is(
':checked')) ? '1' : '0'
}
- }).done(function (res) {
+ }).done(function(res) {
elements.members_limit.val(res.membersLimit);
elements.allow_linked_groups.prop('checked', (res.allowLinkedGroups === '1'));
- elements.allow_federated_circles.prop('checked', (res.allowFederatedCircles === '1'));
elements.skip_invitation_to_closed_circles.prop('checked', (res.skipInvitationStep === '1'));
});
};
- updateTestAsync = function () {
+ updateTestAsync = function() {
self.refreshResult();
};
- refreshResult = function () {
+ refreshResult = function() {
$.ajax({
method: 'GET',
url: OC.generateUrl('/apps/circles/admin/testAsync')
- }).done(function (res) {
+ }).done(function(res) {
self.displayTestAsync(res);
});
};
- displayTestAsync = function (res) {
+ displayTestAsync = function(res) {
// displayTestAsyncResult(res);
// displayTestAsyncNewTest(res);
// displayTestAsyncReset(res);
@@ -185,12 +175,10 @@ $(document).ready(function () {
method: 'GET',
url: OC.generateUrl('/apps/circles/admin/settings'),
data: {}
- }).done(function (res) {
+ }).done(function(res) {
elements.members_limit.val(res.membersLimit);
elements.allow_linked_groups.prop('checked', (res.allowLinkedGroups === '1'));
- elements.allow_federated_circles.prop('checked', (res.allowFederatedCircles === '1'));
elements.skip_invitation_to_closed_circles.prop('checked', (res.skipInvitationStep === '1'));
-
});
//
// var timerTestAsync = setInterval(function () {
diff --git a/lib/Controller/SettingsController.php b/lib/Controller/SettingsController.php
index a4cf026f..7e5a97b4 100644
--- a/lib/Controller/SettingsController.php
+++ b/lib/Controller/SettingsController.php
@@ -47,7 +47,7 @@ class SettingsController extends Controller {
public function setSettings(
- $members_limit, $allow_linked_groups, $allow_federated_circles, $skip_invitation_to_closed_circles
+ $members_limit, $allow_linked_groups, $skip_invitation_to_closed_circles
) {
$this->configService->setAppValue(
ConfigService::CIRCLES_MEMBERS_LIMIT, $members_limit
@@ -56,9 +56,6 @@ class SettingsController extends Controller {
ConfigService::CIRCLES_ALLOW_LINKED_GROUPS, $allow_linked_groups
);
$this->configService->setAppValue(
- ConfigService::CIRCLES_ALLOW_FEDERATED_CIRCLES, $allow_federated_circles
- );
- $this->configService->setAppValue(
ConfigService::CIRCLES_SKIP_INVITATION_STEP, $skip_invitation_to_closed_circles
);
diff --git a/templates/settings.admin.php b/templates/settings.admin.php
index 265bd354..824024eb 100644
--- a/templates/settings.admin.php
+++ b/templates/settings.admin.php
@@ -26,12 +26,7 @@ style(Application::APP_NAME, 'admin');
<?php
}
?>
- <p>
- <input type="checkbox" value="1" id="allow_federated_circles" class="checkbox"/>
- <label for="allow_federated_circles"><?php p($l->t('Allow federated circles')); ?></label>
- <em><?php p($l->t('Circles from different Nextclouds can be linked together.')); ?></em>
- </p>
- <p>
+ <p>
<input type="checkbox" value="1" id="skip_invitation_to_closed_circles" class="checkbox"/>
<label for="skip_invitation_to_closed_circles"><?php p($l->t('Skip invitation step to closed circles')); ?></label>
<em><?php p($l->t('Moderators can add member to closed circles without user approval.')); ?></em>