diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-03-06 19:59:15 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-03-20 15:16:11 +0100 |
commit | 769cb629aebd368fbddd6ea04067fdcfaa262e3e (patch) | |
tree | 432bfb3aca1d60128e79da57c2053bf7f19291a2 /settings/src/store | |
parent | 1c8779dc6e34a89ea9181b3cb252101e457c1543 (diff) | |
download | nextcloud-server-769cb629aebd368fbddd6ea04067fdcfaa262e3e.tar.gz nextcloud-server-769cb629aebd368fbddd6ea04067fdcfaa262e3e.zip |
allow enforcing apps to ignore the max version
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'settings/src/store')
-rw-r--r-- | settings/src/store/apps.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/settings/src/store/apps.js b/settings/src/store/apps.js index 287a1c13505..8074eac2e00 100644 --- a/settings/src/store/apps.js +++ b/settings/src/store/apps.js @@ -213,6 +213,32 @@ const actions = { }) }).catch((error) => context.commit('API_FAILURE', { appId, error })); }, + forceEnableApp(context, { appId, groups }) { + let apps; + if (Array.isArray(appId)) { + apps = appId; + } else { + apps = [appId]; + } + return api.requireAdmin().then(() => { + context.commit('startLoading', apps); + context.commit('startLoading', 'install'); + return api.post(OC.generateUrl(`settings/apps/force`), {appId}) + .then((response) => { + // TODO: find a cleaner solution + location.reload(); + }) + .catch((error) => { + context.commit('stopLoading', apps); + context.commit('stopLoading', 'install'); + context.commit('setError', { + appId: apps, + error: error.response.data.data.message + }); + context.commit('APPS_API_FAILURE', { appId, error}); + }) + }).catch((error) => context.commit('API_FAILURE', { appId, error })); + }, disableApp(context, { appId }) { let apps; if (Array.isArray(appId)) { |