summaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-08-21 22:22:35 +0200
committerLukas Reschke <lukas@owncloud.com>2014-08-21 22:22:35 +0200
commit97b536e3dfd35d1e51ecf866ccb433745c33309a (patch)
treeae39f9099f410e5bcd9dbd4c58b24faa2752a4c7 /settings/js
parent52d5429768acdb87b2dc2efedc89eb4ad0d29139 (diff)
downloadnextcloud-server-97b536e3dfd35d1e51ecf866ccb433745c33309a.tar.gz
nextcloud-server-97b536e3dfd35d1e51ecf866ccb433745c33309a.zip
Add a trusted domain wizard
Adds a little button to the trusted domain warning, if an admin clicks on the warning he will be redirected to ownCloud and asked whether he want to trust this domain. By far not the cleanest code, or clean at all, but does the job and I don't see a reason to make a lot of changes for this little improvement.
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/admin.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/settings/js/admin.js b/settings/js/admin.js
index a202feb4f65..b09704f87b7 100644
--- a/settings/js/admin.js
+++ b/settings/js/admin.js
@@ -38,6 +38,22 @@ var SharingGroupList = {
};
$(document).ready(function(){
+ var params = OC.Util.History.parseUrlQuery();
+
+ // Hack to add a trusted domain
+ if (params.trustDomain) {
+ OC.dialogs.confirm(t('core', 'Are you really sure you want add "{domain}" as trusted domain?', {domain: params.trustDomain}),
+ t('core', 'Add trusted domain'), function(answer) {
+ if(answer) {
+ $.ajax({
+ type: 'POST',
+ url: OC.generateUrl('settings/ajax/setsecurity.php'),
+ data: { trustedDomain: params.trustDomain}
+ });
+ }
+ });
+ }
+
$('select#excludedGroups[multiple]').each(function (index, element) {
SharingGroupList.applyMultipleSelect($(element));