aboutsummaryrefslogtreecommitdiffstats
path: root/settings/js
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-12-05 22:06:14 +0100
committerGitHub <noreply@github.com>2016-12-05 22:06:14 +0100
commit7fe02702b0f5a47714e0ae507d6199d8dbd8f39c (patch)
treecd989944d206b8f4710b37a5f63e22470f7fe080 /settings/js
parent0478db6506d8b1c7bdc50cb3357e9c3ed01903b4 (diff)
parentbecde58952e7c9d1bf0a66de84c166fbfac8e7b4 (diff)
downloadnextcloud-server-7fe02702b0f5a47714e0ae507d6199d8dbd8f39c.tar.gz
nextcloud-server-7fe02702b0f5a47714e0ae507d6199d8dbd8f39c.zip
Merge pull request #2509 from nextcloud/sudo-mode-for-app-enabling
Add sudo mode to enabling and disabling apps
Diffstat (limited to 'settings/js')
-rw-r--r--settings/js/apps.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/settings/js/apps.js b/settings/js/apps.js
index b52fb3d11ab..de35cd53672 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -262,6 +262,11 @@ OC.Settings.Apps = OC.Settings.Apps || {
},
enableApp:function(appId, active, element, groups) {
+ if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {
+ OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.enableApp, this, appId, active, element, groups));
+ return;
+ }
+
var self = this;
OC.Settings.Apps.hideErrorMessage(appId);
groups = groups || [];
@@ -402,6 +407,11 @@ OC.Settings.Apps = OC.Settings.Apps || {
},
uninstallApp:function(appId, element) {
+ if (OC.PasswordConfirmation.requiresPasswordConfirmation()) {
+ OC.PasswordConfirmation.requirePasswordConfirmation(_.bind(this.uninstallApp, this, appId, element));
+ return;
+ }
+
OC.Settings.Apps.hideErrorMessage(appId);
element.val(t('settings','Uninstalling ....'));
$.post(OC.filePath('settings','ajax','uninstallapp.php'),{appid:appId},function(result) {