diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2019-07-03 10:10:56 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-07-09 13:57:04 +0200 |
commit | d058ef2b6c6b3faf354fd8abeecb4cd71949d5a6 (patch) | |
tree | 34275b1f142f429f8c8982f7a79cc2327ee1c0b7 /settings/src/store | |
parent | 1c261675ad3da9804bd9a8c88326103eb2f56bd3 (diff) | |
download | nextcloud-server-d058ef2b6c6b3faf354fd8abeecb4cd71949d5a6.tar.gz nextcloud-server-d058ef2b6c6b3faf354fd8abeecb4cd71949d5a6.zip |
Make it possible to wipe all tokens/devices of a user
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'settings/src/store')
-rw-r--r-- | settings/src/store/users.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/settings/src/store/users.js b/settings/src/store/users.js index 261c5baee69..1b174b21bf4 100644 --- a/settings/src/store/users.js +++ b/settings/src/store/users.js @@ -398,6 +398,20 @@ const actions = { }, /** + * Mark all user devices for remote wipe + * + * @param {Object} context + * @param {string} userid User id + * @returns {Promise} + */ + wipeUserDevices(context, userid) { + return api.requireAdmin().then((response) => { + return api.post(OC.linkToOCS(`cloud/users/${userid}/wipe`, 2)) + .catch((error) => {throw error;}); + }).catch((error) => context.commit('API_FAILURE', { userid, error })); + }, + + /** * Delete a user * * @param {Object} context |