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KC,EAAOC,CAAM,EAGlBuB,EAAI,UAAU,EAAIqG,EAClBrG,EAAI,UAAU,EAAIN,EAClBM,EAAI,IAAIsG,CAAc,EAEtB,MAAMC,GAAQC,EAAY,EAEXC,GAAA,IAAIzG,EAAI,CACtB,OAAAvB,EACA,MAAAD,EACA,MAAA+H,GACA,OAAaG,KAAEC,CAAW,EAC1B,GAAI,UACL,CAAC","names":["sync","store","router","options","moduleName","cloneRoute","state","transition","isTimeTraveling","currentPath","storeUnwatch","route","fullPath","afterEachUnHook","to","from","clone","AppStore","__vitePreload","n","AppStoreNavigation","AppStoreSidebar","UserManagement","UserManagementNavigation","routes","Vue","Router","generateUrl","GroupSorting","sanitize","url","api","confirmPassword","axios","data","localStorage","getBuilder","defaults","mutations","usersObj","existingUsers","id","newUsers","users","_usersObj","length","groups","orderBy","userCount","group","gid","displayName","e","groupIndex","groupSearch","updatedGroup","userid","user","userIndex","response","enabled","actionType","disabledGroup","userGroup","logger","key","value","humanValue","parseFileSize","sorting","oldValue","error","showError","getters","a","b","numA","numB","CancelToken","searchRequestCancelSource","actions","context","offset","limit","search","generateOcsUrl","userId","usersCount","limitParam","groupid","getCapabilities","commit","dispatch","password","email","subadmin","quota","language","manager","userStatus","allowedEmpty","loadState","categories","updateCount","categoriesPromise","category","categoriesArray","apps","appId","_id","app","canInstall","version","selectedCategoryId","_appId","showInfo","shouldRefetchCategories","categoriesPromiseResponse","settings","oc","Vuex","debug","message","useStore","Store","VTooltip","t","PiniaVuePlugin","pinia","createPinia","mainAppsUsersManagement","h","SettingsApp"],"ignoreList":[0],"sources":["../node_modules/vuex-router-sync/index.js","../apps/settings/src/router/routes.ts","../apps/settings/src/router/index.ts","../apps/settings/src/constants/GroupManagement.ts","../apps/settings/src/store/api.js","../apps/settings/src/store/users.js","../apps/settings/src/store/apps.js","../apps/settings/src/store/users-settings.js","../apps/settings/src/store/oc.js","../apps/settings/src/store/index.js","../apps/settings/src/main-apps-users-management.ts"],"sourcesContent":["exports.sync = function (store, router, options) {\n var moduleName = (options || {}).moduleName || 'route'\n\n store.registerModule(moduleName, {\n namespaced: true,\n state: cloneRoute(router.currentRoute),\n mutations: {\n 'ROUTE_CHANGED': function ROUTE_CHANGED (state, transition) {\n store.state[moduleName] = cloneRoute(transition.to, transition.from)\n }\n }\n })\n\n var isTimeTraveling = false\n var currentPath\n\n // sync router on store change\n var storeUnwatch = store.watch(\n function (state) { return state[moduleName]; },\n function (route) {\n var fullPath = route.fullPath;\n if (fullPath === currentPath) {\n return\n }\n if (currentPath != null) {\n isTimeTraveling = true\n router.push(route)\n }\n currentPath = fullPath\n },\n { sync: true }\n )\n\n // sync store on router navigation\n var afterEachUnHook = router.afterEach(function (to, from) {\n if (isTimeTraveling) {\n isTimeTraveling = false\n return\n }\n currentPath = to.fullPath\n store.commit(moduleName + '/ROUTE_CHANGED', { to: to, from: from })\n })\n\n return function unsync () {\n // On unsync, remove router hook\n if (afterEachUnHook != null) {\n afterEachUnHook()\n }\n\n // On unsync, remove store watch\n if (storeUnwatch != null) {\n storeUnwatch()\n }\n\n // On unsync, unregister Module with store\n store.unregisterModule(moduleName)\n }\n}\n\nfunction cloneRoute (to, from) {\n var clone = {\n name: to.name,\n path: to.path,\n hash: to.hash,\n query: to.query,\n params: to.params,\n fullPath: to.fullPath,\n meta: to.meta\n }\n if (from) {\n clone.from = cloneRoute(from)\n }\n return Object.freeze(clone)\n}\n\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport type { RouteConfig } from 'vue-router'\n\n// Dynamic loading\nconst AppStore = () => import(/* webpackChunkName: 'settings-apps-view' */'../views/AppStore.vue')\nconst AppStoreNavigation = () => import(/* webpackChunkName: 'settings-apps-view' */'../views/AppStoreNavigation.vue')\nconst AppStoreSidebar = () => import(/* webpackChunkName: 'settings-apps-view' */'../views/AppStoreSidebar.vue')\n\nconst UserManagement = () => import(/* webpackChunkName: 'settings-users' */'../views/UserManagement.vue')\nconst UserManagementNavigation = () => import(/* webpackChunkName: 'settings-users' */'../views/UserManagementNavigation.vue')\n\nconst routes: RouteConfig[] = [\n\t{\n\t\tname: 'users',\n\t\tpath: '/:index(index.php/)?settings/users',\n\t\tcomponents: {\n\t\t\tdefault: UserManagement,\n\t\t\tnavigation: UserManagementNavigation,\n\t\t},\n\t\tprops: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tpath: ':selectedGroup',\n\t\t\t\tname: 'group',\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tpath: '/:index(index.php/)?settings/apps',\n\t\tname: 'apps',\n\t\t// redirect to our default route - the app discover section\n\t\tredirect: {\n\t\t\tname: 'apps-category',\n\t\t\tparams: {\n\t\t\t\tcategory: 'discover',\n\t\t\t},\n\t\t},\n\t\tcomponents: {\n\t\t\tdefault: AppStore,\n\t\t\tnavigation: AppStoreNavigation,\n\t\t\tsidebar: AppStoreSidebar,\n\t\t},\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tpath: ':category',\n\t\t\t\tname: 'apps-category',\n\t\t\t\tchildren: [\n\t\t\t\t\t{\n\t\t\t\t\t\tpath: ':id',\n\t\t\t\t\t\tname: 'apps-details',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n]\n\nexport default routes\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport Vue from 'vue'\nimport Router from 'vue-router'\nimport { generateUrl } from '@nextcloud/router'\nimport routes from './routes.ts'\n\nVue.use(Router)\n\nconst router = new Router({\n\tmode: 'history',\n\t// if index.php is in the url AND we got this far, then it's working:\n\t// let's keep using index.php in the url\n\tbase: generateUrl(''),\n\tlinkActiveClass: 'active',\n\troutes,\n})\n\nexport default router\n","/**\n * SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\n/**\n * https://github.com/nextcloud/server/blob/208e38e84e1a07a49699aa90dc5b7272d24489f0/lib/private/Group/MetaData.php#L34\n */\nexport enum GroupSorting {\n\tUserCount = 1,\n\tGroupName = 2\n}\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport axios from '@nextcloud/axios'\nimport { confirmPassword } from '@nextcloud/password-confirmation'\nimport '@nextcloud/password-confirmation/dist/style.css'\n\nconst sanitize = function(url) {\n\treturn url.replace(/\\/$/, '') // Remove last url slash\n}\n\nexport default {\n\n\t/**\n\t * This Promise is used to chain a request that require an admin password confirmation\n\t * Since chaining Promise have a very precise behavior concerning catch and then,\n\t * you'll need to be careful when using it.\n\t * e.g\n\t * // store\n\t * action(context) {\n\t * return api.requireAdmin().then((response) => {\n\t * return api.get('url')\n\t * .then((response) => {API success})\n\t * .catch((error) => {API failure});\n\t * }).catch((error) => {requireAdmin failure});\n\t * }\n\t * // vue\n\t * this.$store.dispatch('action').then(() => {always executed})\n\t *\n\t * Since Promise.then().catch().then() will always execute the last then\n\t * this.$store.dispatch('action').then will always be executed\n\t *\n\t * If you want requireAdmin failure to also catch the API request failure\n\t * you will need to throw a new error in the api.get.catch()\n\t *\n\t * e.g\n\t * api.requireAdmin().then((response) => {\n\t * api.get('url')\n\t * .then((response) => {API success})\n\t * .catch((error) => {throw error;});\n\t * }).catch((error) => {requireAdmin OR API failure});\n\t *\n\t * @return {Promise}\n\t */\n\trequireAdmin() {\n\t\treturn confirmPassword()\n\t},\n\tget(url, options) {\n\t\treturn axios.get(sanitize(url), options)\n\t},\n\tpost(url, data) {\n\t\treturn axios.post(sanitize(url), data)\n\t},\n\tpatch(url, data) {\n\t\treturn axios.patch(sanitize(url), data)\n\t},\n\tput(url, data) {\n\t\treturn axios.put(sanitize(url), data)\n\t},\n\tdelete(url, data) {\n\t\treturn axios.delete(sanitize(url), { params: data })\n\t},\n}\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { getBuilder } from '@nextcloud/browser-storage'\nimport { getCapabilities } from '@nextcloud/capabilities'\nimport { parseFileSize } from '@nextcloud/files'\nimport { showError } from '@nextcloud/dialogs'\nimport { generateOcsUrl, generateUrl } from '@nextcloud/router'\nimport axios from '@nextcloud/axios'\n\nimport { GroupSorting } from '../constants/GroupManagement.ts'\nimport api from './api.js'\nimport logger from '../logger.ts'\n\nconst localStorage = getBuilder('settings').persist(true).build()\n\nconst defaults = {\n\tgroup: {\n\t\tid: '',\n\t\tname: '',\n\t\tusercount: 0,\n\t\tdisabled: 0,\n\t\tcanAdd: true,\n\t\tcanRemove: true,\n\t},\n}\n\nconst state = {\n\tusers: [],\n\tgroups: [],\n\torderBy: GroupSorting.UserCount,\n\tminPasswordLength: 0,\n\tusersOffset: 0,\n\tusersLimit: 25,\n\tdisabledUsersOffset: 0,\n\tdisabledUsersLimit: 25,\n\tuserCount: 0,\n\tshowConfig: {\n\t\tshowStoragePath: localStorage.getItem('account_settings__showStoragePath') === 'true',\n\t\tshowUserBackend: localStorage.getItem('account_settings__showUserBackend') === 'true',\n\t\tshowLastLogin: localStorage.getItem('account_settings__showLastLogin') === 'true',\n\t\tshowNewUserForm: localStorage.getItem('account_settings__showNewUserForm') === 'true',\n\t\tshowLanguages: localStorage.getItem('account_settings__showLanguages') === 'true',\n\t},\n}\n\nconst mutations = {\n\tappendUsers(state, usersObj) {\n\t\tconst existingUsers = state.users.map(({ id }) => id)\n\t\tconst newUsers = Object.values(usersObj)\n\t\t\t.filter(({ id }) => !existingUsers.includes(id))\n\n\t\tconst users = state.users.concat(newUsers)\n\t\tstate.usersOffset += state.usersLimit\n\t\tstate.users = users\n\t},\n\tupdateDisabledUsers(state, _usersObj) {\n\t\tstate.disabledUsersOffset += state.disabledUsersLimit\n\t},\n\tsetPasswordPolicyMinLength(state, length) {\n\t\tstate.minPasswordLength = length !== '' ? length : 0\n\t},\n\tinitGroups(state, { groups, orderBy, userCount }) {\n\t\tstate.groups = groups.map(group => Object.assign({}, defaults.group, group))\n\t\tstate.orderBy = orderBy\n\t\tstate.userCount = userCount\n\t},\n\taddGroup(state, { gid, displayName }) {\n\t\ttry {\n\t\t\tif (typeof state.groups.find((group) => group.id === gid) !== 'undefined') {\n\t\t\t\treturn\n\t\t\t}\n\t\t\t// extend group to default values\n\t\t\tconst group = Object.assign({}, defaults.group, {\n\t\t\t\tid: gid,\n\t\t\t\tname: displayName,\n\t\t\t})\n\t\t\tstate.groups.unshift(group)\n\t\t} catch (e) {\n\t\t\tconsole.error('Can\\'t create group', e)\n\t\t}\n\t},\n\trenameGroup(state, { gid, displayName }) {\n\t\tconst groupIndex = state.groups.findIndex(groupSearch => groupSearch.id === gid)\n\t\tif (groupIndex >= 0) {\n\t\t\tconst updatedGroup = state.groups[groupIndex]\n\t\t\tupdatedGroup.name = displayName\n\t\t\tstate.groups.splice(groupIndex, 1, updatedGroup)\n\t\t}\n\t},\n\tremoveGroup(state, gid) {\n\t\tconst groupIndex = state.groups.findIndex(groupSearch => groupSearch.id === gid)\n\t\tif (groupIndex >= 0) {\n\t\t\tstate.groups.splice(groupIndex, 1)\n\t\t}\n\t},\n\taddUserGroup(state, { userid, gid }) {\n\t\tconst group = state.groups.find(groupSearch => groupSearch.id === gid)\n\t\tconst user = state.users.find(user => user.id === userid)\n\t\t// increase count if user is enabled\n\t\tif (group && user.enabled && state.userCount > 0) {\n\t\t\tgroup.usercount++\n\t\t}\n\t\tconst groups = user.groups\n\t\tgroups.push(gid)\n\t},\n\tremoveUserGroup(state, { userid, gid }) {\n\t\tconst group = state.groups.find(groupSearch => groupSearch.id === gid)\n\t\tconst user = state.users.find(user => user.id === userid)\n\t\t// lower count if user is enabled\n\t\tif (group && user.enabled && state.userCount > 0) {\n\t\t\tgroup.usercount--\n\t\t}\n\t\tconst groups = user.groups\n\t\tgroups.splice(groups.indexOf(gid), 1)\n\t},\n\taddUserSubAdmin(state, { userid, gid }) {\n\t\tconst groups = state.users.find(user => user.id === userid).subadmin\n\t\tgroups.push(gid)\n\t},\n\tremoveUserSubAdmin(state, { userid, gid }) {\n\t\tconst groups = state.users.find(user => user.id === userid).subadmin\n\t\tgroups.splice(groups.indexOf(gid), 1)\n\t},\n\tdeleteUser(state, userid) {\n\t\tconst userIndex = state.users.findIndex(user => user.id === userid)\n\t\tthis.commit('updateUserCounts', { user: state.users[userIndex], actionType: 'remove' })\n\t\tstate.users.splice(userIndex, 1)\n\t},\n\taddUserData(state, response) {\n\t\tconst user = response.data.ocs.data\n\t\tstate.users.unshift(user)\n\t\tthis.commit('updateUserCounts', { user, actionType: 'create' })\n\t},\n\tenableDisableUser(state, { userid, enabled }) {\n\t\tconst user = state.users.find(user => user.id === userid)\n\t\tuser.enabled = enabled\n\t\tthis.commit('updateUserCounts', { user, actionType: enabled ? 'enable' : 'disable' })\n\t},\n\t// update active/disabled counts, groups counts\n\tupdateUserCounts(state, { user, actionType }) {\n\t\t// 0 is a special value\n\t\tif (state.userCount === 0) {\n\t\t\treturn\n\t\t}\n\n\t\tconst disabledGroup = state.groups.find(group => group.id === 'disabled')\n\t\tswitch (actionType) {\n\t\tcase 'enable':\n\t\tcase 'disable':\n\t\t\tdisabledGroup.usercount += user.enabled ? -1 : 1 // update Disabled Users count\n\t\t\tstate.userCount += user.enabled ? 1 : -1 // update Active Users count\n\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\tconst group = state.groups.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\tgroup.disabled += user.enabled ? -1 : 1 // update group disabled count\n\t\t\t})\n\t\t\tbreak\n\t\tcase 'create':\n\t\t\tstate.userCount++ // increment Active Users count\n\n\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\tstate.groups\n\t\t\t\t\t.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\t .usercount++ // increment group total count\n\t\t\t})\n\t\t\tbreak\n\t\tcase 'remove':\n\t\t\tif (user.enabled) {\n\t\t\t\tstate.userCount-- // decrement Active Users count\n\t\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\t\tconst group = state.groups.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\t\tif (!group) {\n\t\t\t\t\t\tconsole.warn('User group ' + userGroup + ' does not exist during user removal')\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tgroup.usercount-- // decrement group total count\n\t\t\t\t})\n\t\t\t} else {\n\t\t\t\tdisabledGroup.usercount-- // decrement Disabled Users count\n\t\t\t\tuser.groups.forEach(userGroup => {\n\t\t\t\t\tconst group = state.groups.find(groupSearch => groupSearch.id === userGroup)\n\t\t\t\t\tgroup.disabled-- // decrement group disabled count\n\t\t\t\t})\n\t\t\t}\n\t\t\tbreak\n\t\tdefault:\n\t\t\tlogger.error(`Unknown action type in updateUserCounts: '${actionType}'`)\n\t\t\t// not throwing error to interrupt execution as this is not fatal\n\t\t}\n\t},\n\tsetUserData(state, { userid, key, value }) {\n\t\tif (key === 'quota') {\n\t\t\tconst humanValue = parseFileSize(value, true)\n\t\t\tstate.users.find(user => user.id === userid)[key][key] = humanValue !== null ? humanValue : value\n\t\t} else {\n\t\t\tstate.users.find(user => user.id === userid)[key] = value\n\t\t}\n\t},\n\n\t/**\n\t * Reset users list\n\t *\n\t * @param {object} state the store state\n\t */\n\tresetUsers(state) {\n\t\tstate.users = []\n\t\tstate.usersOffset = 0\n\t\tstate.disabledUsersOffset = 0\n\t},\n\n\tsetShowConfig(state, { key, value }) {\n\t\tlocalStorage.setItem(`account_settings__${key}`, JSON.stringify(value))\n\t\tstate.showConfig[key] = value\n\t},\n\n\tsetGroupSorting(state, sorting) {\n\t\tconst oldValue = state.orderBy\n\t\tstate.orderBy = sorting\n\n\t\t// Persist the value on the server\n\t\taxios.post(\n\t\t\tgenerateUrl('/settings/users/preferences/group.sortBy'),\n\t\t\t{\n\t\t\t\tvalue: String(sorting),\n\t\t\t},\n\t\t).catch((error) => {\n\t\t\tstate.orderBy = oldValue\n\t\t\tshowError(t('settings', 'Could not set group sorting'))\n\t\t\tlogger.error(error)\n\t\t})\n\t},\n}\n\nconst getters = {\n\tgetUsers(state) {\n\t\treturn state.users\n\t},\n\tgetGroups(state) {\n\t\treturn state.groups\n\t},\n\tgetSubadminGroups(state) {\n\t\t// Can't be subadmin of admin or disabled\n\t\treturn state.groups.filter(group => group.id !== 'admin' && group.id !== 'disabled')\n\t},\n\tgetSortedGroups(state) {\n\t\tconst groups = [...state.groups]\n\t\tif (state.orderBy === GroupSorting.UserCount) {\n\t\t\treturn groups.sort((a, b) => {\n\t\t\t\tconst numA = a.usercount - a.disabled\n\t\t\t\tconst numB = b.usercount - b.disabled\n\t\t\t\treturn (numA < numB) ? 1 : (numB < numA ? -1 : a.name.localeCompare(b.name))\n\t\t\t})\n\t\t} else {\n\t\t\treturn groups.sort((a, b) => a.name.localeCompare(b.name))\n\t\t}\n\t},\n\tgetGroupSorting(state) {\n\t\treturn state.orderBy\n\t},\n\tgetPasswordPolicyMinLength(state) {\n\t\treturn state.minPasswordLength\n\t},\n\tgetUsersOffset(state) {\n\t\treturn state.usersOffset\n\t},\n\tgetUsersLimit(state) {\n\t\treturn state.usersLimit\n\t},\n\tgetDisabledUsersOffset(state) {\n\t\treturn state.disabledUsersOffset\n\t},\n\tgetDisabledUsersLimit(state) {\n\t\treturn state.disabledUsersLimit\n\t},\n\tgetUserCount(state) {\n\t\treturn state.userCount\n\t},\n\tgetShowConfig(state) {\n\t\treturn state.showConfig\n\t},\n}\n\nconst CancelToken = axios.CancelToken\nlet searchRequestCancelSource = null\n\nconst actions = {\n\n\t/**\n\t * search users\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.search Search amongst users\n\t * @return {Promise}\n\t */\n\tsearchUsers(context, { offset, limit, search }) {\n\t\tsearch = typeof search === 'string' ? search : ''\n\n\t\treturn api.get(generateOcsUrl('cloud/users/details?offset={offset}&limit={limit}&search={search}', { offset, limit, search })).catch((error) => {\n\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t}\n\t\t})\n\t},\n\n\t/**\n\t * Get user details\n\t *\n\t * @param {object} context store context\n\t * @param {string} userId user id\n\t * @return {Promise}\n\t */\n\tgetUser(context, userId) {\n\t\treturn api.get(generateOcsUrl(`cloud/users/${userId}`)).catch((error) => {\n\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t}\n\t\t})\n\t},\n\n\t/**\n\t * Get all users with full details\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.search Search amongst users\n\t * @param {string} options.group Get users from group\n\t * @return {Promise}\n\t */\n\tgetUsers(context, { offset, limit, search, group }) {\n\t\tif (searchRequestCancelSource) {\n\t\t\tsearchRequestCancelSource.cancel('Operation canceled by another search request.')\n\t\t}\n\t\tsearchRequestCancelSource = CancelToken.source()\n\t\tsearch = typeof search === 'string' ? search : ''\n\n\t\t/**\n\t\t * Adding filters in the search bar such as in:files, in:users, etc.\n\t\t * collides with this particular search, so we need to remove them\n\t\t * here and leave only the original search query\n\t\t */\n\t\tsearch = search.replace(/in:[^\\s]+/g, '').trim()\n\n\t\tgroup = typeof group === 'string' ? group : ''\n\t\tif (group !== '') {\n\t\t\treturn api.get(generateOcsUrl('cloud/groups/{group}/users/details?offset={offset}&limit={limit}&search={search}', { group: encodeURIComponent(group), offset, limit, search }), {\n\t\t\t\tcancelToken: searchRequestCancelSource.token,\n\t\t\t})\n\t\t\t\t.then((response) => {\n\t\t\t\t\tconst usersCount = Object.keys(response.data.ocs.data.users).length\n\t\t\t\t\tif (usersCount > 0) {\n\t\t\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\t\t}\n\t\t\t\t\treturn usersCount\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t}\n\n\t\treturn api.get(generateOcsUrl('cloud/users/details?offset={offset}&limit={limit}&search={search}', { offset, limit, search }), {\n\t\t\tcancelToken: searchRequestCancelSource.token,\n\t\t})\n\t\t\t.then((response) => {\n\t\t\t\tconst usersCount = Object.keys(response.data.ocs.data.users).length\n\t\t\t\tif (usersCount > 0) {\n\t\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\t}\n\t\t\t\treturn usersCount\n\t\t\t})\n\t\t\t.catch((error) => {\n\t\t\t\tif (!axios.isCancel(error)) {\n\t\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t\t}\n\t\t\t})\n\t},\n\n\t/**\n\t * Get disabled users with full details\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @return {Promise<number>}\n\t */\n\tasync getDisabledUsers(context, { offset, limit, search }) {\n\t\tconst url = generateOcsUrl('cloud/users/disabled?offset={offset}&limit={limit}&search={search}', { offset, limit, search })\n\t\ttry {\n\t\t\tconst response = await api.get(url)\n\t\t\tconst usersCount = Object.keys(response.data.ocs.data.users).length\n\t\t\tif (usersCount > 0) {\n\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\tcontext.commit('updateDisabledUsers', response.data.ocs.data.users)\n\t\t\t}\n\t\t\treturn usersCount\n\t\t} catch (error) {\n\t\t\tcontext.commit('API_FAILURE', error)\n\t\t}\n\t},\n\n\tgetGroups(context, { offset, limit, search }) {\n\t\tsearch = typeof search === 'string' ? search : ''\n\t\tconst limitParam = limit === -1 ? '' : `&limit=${limit}`\n\t\treturn api.get(generateOcsUrl('cloud/groups?offset={offset}&search={search}', { offset, search }) + limitParam)\n\t\t\t.then((response) => {\n\t\t\t\tif (Object.keys(response.data.ocs.data.groups).length > 0) {\n\t\t\t\t\tresponse.data.ocs.data.groups.forEach(function(group) {\n\t\t\t\t\t\tcontext.commit('addGroup', { gid: group, displayName: group })\n\t\t\t\t\t})\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t})\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\t/**\n\t * Get all users with full details\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.search -\n\t * @return {Promise}\n\t */\n\tgetUsersFromList(context, { offset, limit, search }) {\n\t\tsearch = typeof search === 'string' ? search : ''\n\t\treturn api.get(generateOcsUrl('cloud/users/details?offset={offset}&limit={limit}&search={search}', { offset, limit, search }))\n\t\t\t.then((response) => {\n\t\t\t\tif (Object.keys(response.data.ocs.data.users).length > 0) {\n\t\t\t\t\tcontext.commit('appendUsers', response.data.ocs.data.users)\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\treturn false\n\t\t\t})\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\t/**\n\t * Get all users with full details from a groupid\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {number} options.offset List offset to request\n\t * @param {number} options.limit List number to return from offset\n\t * @param {string} options.groupid -\n\t * @return {Promise}\n\t */\n\tgetUsersFromGroup(context, { groupid, offset, limit }) {\n\t\treturn api.get(generateOcsUrl('cloud/users/{groupId}/details?offset={offset}&limit={limit}', { groupId: encodeURIComponent(groupid), offset, limit }))\n\t\t\t.then((response) => context.commit('getUsersFromList', response.data.ocs.data.users))\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\tgetPasswordPolicyMinLength(context) {\n\t\tif (getCapabilities().password_policy && getCapabilities().password_policy.minLength) {\n\t\t\tcontext.commit('setPasswordPolicyMinLength', getCapabilities().password_policy.minLength)\n\t\t\treturn getCapabilities().password_policy.minLength\n\t\t}\n\t\treturn false\n\t},\n\n\t/**\n\t * Add group\n\t *\n\t * @param {object} context store context\n\t * @param {string} gid Group id\n\t * @return {Promise}\n\t */\n\taddGroup(context, gid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/groups'), { groupid: gid })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('addGroup', { gid, displayName: gid })\n\t\t\t\t\treturn { gid, displayName: gid }\n\t\t\t\t})\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcontext.commit('API_FAILURE', { gid, error })\n\t\t\t// let's throw one more time to prevent the view\n\t\t\t// from adding the user to a group that doesn't exists\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Rename group\n\t *\n\t * @param {object} context store context\n\t * @param {string} groupid Group id\n\t * @param {string} displayName Group display name\n\t * @return {Promise}\n\t */\n\trenameGroup(context, { groupid, displayName }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.put(generateOcsUrl('cloud/groups/{groupId}', { groupId: encodeURIComponent(groupid) }), { key: 'displayname', value: displayName })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('renameGroup', { gid: groupid, displayName })\n\t\t\t\t\treturn { groupid, displayName }\n\t\t\t\t})\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcontext.commit('API_FAILURE', { groupid, error })\n\t\t\t// let's throw one more time to prevent the view\n\t\t\t// from renaming the group\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Remove group\n\t *\n\t * @param {object} context store context\n\t * @param {string} gid Group id\n\t * @return {Promise}\n\t */\n\tremoveGroup(context, gid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/groups/{groupId}', { groupId: encodeURIComponent(gid) }))\n\t\t\t\t.then((response) => context.commit('removeGroup', gid))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { gid, error }))\n\t},\n\n\t/**\n\t * Add user to group\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\taddUserGroup(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/groups', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('addUserGroup', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Remove user from group\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\tremoveUserGroup(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/users/{userid}/groups', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('removeUserGroup', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcontext.commit('API_FAILURE', { userid, error })\n\t\t\t// let's throw one more time to prevent\n\t\t\t// the view from removing the user row on failure\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Add user to group admin\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\taddUserSubAdmin(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/subadmins', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('addUserSubAdmin', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Remove user from group admin\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.gid Group id\n\t * @return {Promise}\n\t */\n\tremoveUserSubAdmin(context, { userid, gid }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/users/{userid}/subadmins', { userid }), { groupid: gid })\n\t\t\t\t.then((response) => context.commit('removeUserSubAdmin', { userid, gid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Mark all user devices for remote wipe\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\twipeUserDevices(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/wipe', { userid }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Delete a user\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\tdeleteUser(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.delete(generateOcsUrl('cloud/users/{userid}', { userid }))\n\t\t\t\t.then((response) => context.commit('deleteUser', userid))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Add a user\n\t *\n\t * @param {object} context store context\n\t * @param {Function} context.commit -\n\t * @param {Function} context.dispatch -\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.password User password\n\t * @param {string} options.displayName User display name\n\t * @param {string} options.email User email\n\t * @param {string} options.groups User groups\n\t * @param {string} options.subadmin User subadmin groups\n\t * @param {string} options.quota User email\n\t * @param {string} options.language User language\n\t * @param {string} options.manager User manager\n\t * @return {Promise}\n\t */\n\taddUser({ commit, dispatch }, { userid, password, displayName, email, groups, subadmin, quota, language, manager }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users'), { userid, password, displayName, email, groups, subadmin, quota, language, manager })\n\t\t\t\t.then((response) => dispatch('addUserData', userid || response.data.ocs.data.id))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => {\n\t\t\tcommit('API_FAILURE', { userid, error })\n\t\t\tthrow error\n\t\t})\n\t},\n\n\t/**\n\t * Get user data and commit addition\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\taddUserData(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.get(generateOcsUrl('cloud/users/{userid}', { userid }))\n\t\t\t\t.then((response) => context.commit('addUserData', response))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Enable or disable user\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {boolean} options.enabled User enablement status\n\t * @return {Promise}\n\t */\n\tenableDisableUser(context, { userid, enabled = true }) {\n\t\tconst userStatus = enabled ? 'enable' : 'disable'\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.put(generateOcsUrl('cloud/users/{userid}/{userStatus}', { userid, userStatus }))\n\t\t\t\t.then((response) => context.commit('enableDisableUser', { userid, enabled }))\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n\n\t/**\n\t * Edit user data\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.userid User id\n\t * @param {string} options.key User field to edit\n\t * @param {string} options.value Value of the change\n\t * @return {Promise}\n\t */\n\tsetUserData(context, { userid, key, value }) {\n\t\tconst allowedEmpty = ['email', 'displayname', 'manager']\n\t\tif (['email', 'language', 'quota', 'displayname', 'password', 'manager'].indexOf(key) !== -1) {\n\t\t\t// We allow empty email or displayname\n\t\t\tif (typeof value === 'string'\n\t\t\t\t&& (\n\t\t\t\t\t(allowedEmpty.indexOf(key) === -1 && value.length > 0)\n\t\t\t\t\t|| allowedEmpty.indexOf(key) !== -1\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn api.requireAdmin().then((response) => {\n\t\t\t\t\treturn api.put(generateOcsUrl('cloud/users/{userid}', { userid }), { key, value })\n\t\t\t\t\t\t.then((response) => context.commit('setUserData', { userid, key, value }))\n\t\t\t\t\t\t.catch((error) => { throw error })\n\t\t\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t\t\t}\n\t\t}\n\t\treturn Promise.reject(new Error('Invalid request data'))\n\t},\n\n\t/**\n\t * Send welcome mail\n\t *\n\t * @param {object} context store context\n\t * @param {string} userid User id\n\t * @return {Promise}\n\t */\n\tsendWelcomeMail(context, userid) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users/{userid}/welcome', { userid }))\n\t\t\t\t.then(response => true)\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { userid, error }))\n\t},\n}\n\nexport default { state, mutations, getters, actions }\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport api from './api.js'\nimport Vue from 'vue'\nimport { generateUrl } from '@nextcloud/router'\nimport { showError, showInfo } from '@nextcloud/dialogs'\nimport { loadState } from '@nextcloud/initial-state'\n\nconst state = {\n\tapps: [],\n\tbundles: loadState('settings', 'appstoreBundles', []),\n\tcategories: [],\n\tupdateCount: loadState('settings', 'appstoreUpdateCount', 0),\n\tloading: {},\n\tgettingCategoriesPromise: null,\n}\n\nconst mutations = {\n\n\tAPPS_API_FAILURE(state, error) {\n\t\tshowError(t('settings', 'An error occurred during the request. Unable to proceed.') + '<br>' + error.error.response.data.data.message, { isHTML: true })\n\t\tconsole.error(state, error)\n\t},\n\n\tinitCategories(state, { categories, updateCount }) {\n\t\tstate.categories = categories\n\t\tstate.updateCount = updateCount\n\t},\n\n\tupdateCategories(state, categoriesPromise) {\n\t\tstate.gettingCategoriesPromise = categoriesPromise\n\t},\n\n\tsetUpdateCount(state, updateCount) {\n\t\tstate.updateCount = updateCount\n\t},\n\n\taddCategory(state, category) {\n\t\tstate.categories.push(category)\n\t},\n\n\tappendCategories(state, categoriesArray) {\n\t\t// convert obj to array\n\t\tstate.categories = categoriesArray\n\t},\n\n\tsetAllApps(state, apps) {\n\t\tstate.apps = apps\n\t},\n\n\tsetError(state, { appId, error }) {\n\t\tif (!Array.isArray(appId)) {\n\t\t\tappId = [appId]\n\t\t}\n\t\tappId.forEach((_id) => {\n\t\t\tconst app = state.apps.find(app => app.id === _id)\n\t\t\tapp.error = error\n\t\t})\n\t},\n\n\tclearError(state, { appId, error }) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tapp.error = null\n\t},\n\n\tenableApp(state, { appId, groups }) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tapp.active = true\n\t\tapp.groups = groups\n\t},\n\n\tsetInstallState(state, { appId, canInstall }) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tif (app) {\n\t\t\tapp.canInstall = canInstall === true\n\t\t}\n\t},\n\n\tdisableApp(state, appId) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tapp.active = false\n\t\tapp.groups = []\n\t\tif (app.removable) {\n\t\t\tapp.canUnInstall = true\n\t\t}\n\t},\n\n\tuninstallApp(state, appId) {\n\t\tstate.apps.find(app => app.id === appId).active = false\n\t\tstate.apps.find(app => app.id === appId).groups = []\n\t\tstate.apps.find(app => app.id === appId).needsDownload = true\n\t\tstate.apps.find(app => app.id === appId).installed = false\n\t\tstate.apps.find(app => app.id === appId).canUnInstall = false\n\t\tstate.apps.find(app => app.id === appId).canInstall = true\n\t},\n\n\tupdateApp(state, appId) {\n\t\tconst app = state.apps.find(app => app.id === appId)\n\t\tconst version = app.update\n\t\tapp.update = null\n\t\tapp.version = version\n\t\tstate.updateCount--\n\n\t},\n\n\tresetApps(state) {\n\t\tstate.apps = []\n\t},\n\treset(state) {\n\t\tstate.apps = []\n\t\tstate.categories = []\n\t\tstate.updateCount = 0\n\t},\n\tstartLoading(state, id) {\n\t\tif (Array.isArray(id)) {\n\t\t\tid.forEach((_id) => {\n\t\t\t\tVue.set(state.loading, _id, true)\n\t\t\t})\n\t\t} else {\n\t\t\tVue.set(state.loading, id, true)\n\t\t}\n\t},\n\tstopLoading(state, id) {\n\t\tif (Array.isArray(id)) {\n\t\t\tid.forEach((_id) => {\n\t\t\t\tVue.set(state.loading, _id, false)\n\t\t\t})\n\t\t} else {\n\t\t\tVue.set(state.loading, id, false)\n\t\t}\n\t},\n}\n\nconst getters = {\n\tloading(state) {\n\t\treturn function(id) {\n\t\t\treturn state.loading[id]\n\t\t}\n\t},\n\tgetCategories(state) {\n\t\treturn state.categories\n\t},\n\tgetAllApps(state) {\n\t\treturn state.apps\n\t},\n\tgetAppBundles(state) {\n\t\treturn state.bundles\n\t},\n\tgetUpdateCount(state) {\n\t\treturn state.updateCount\n\t},\n\tgetCategoryById: (state) => (selectedCategoryId) => {\n\t\treturn state.categories.find((category) => category.id === selectedCategoryId)\n\t},\n}\n\nconst actions = {\n\n\tenableApp(context, { appId, groups }) {\n\t\tlet apps\n\t\tif (Array.isArray(appId)) {\n\t\t\tapps = appId\n\t\t} else {\n\t\t\tapps = [appId]\n\t\t}\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', apps)\n\t\t\tcontext.commit('startLoading', 'install')\n\t\t\treturn api.post(generateUrl('settings/apps/enable'), { appIds: apps, groups })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tapps.forEach(_appId => {\n\t\t\t\t\t\tcontext.commit('enableApp', { appId: _appId, groups })\n\t\t\t\t\t})\n\n\t\t\t\t\t// check for server health\n\t\t\t\t\treturn api.get(generateUrl('apps/files/'))\n\t\t\t\t\t\t.then(() => {\n\t\t\t\t\t\t\tif (response.data.update_required) {\n\t\t\t\t\t\t\t\tshowInfo(\n\t\t\t\t\t\t\t\t\tt(\n\t\t\t\t\t\t\t\t\t\t'settings',\n\t\t\t\t\t\t\t\t\t\t'The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds.'\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tonClick: () => window.location.reload(),\n\t\t\t\t\t\t\t\t\t\tclose: false,\n\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tsetTimeout(function() {\n\t\t\t\t\t\t\t\t\tlocation.reload()\n\t\t\t\t\t\t\t\t}, 5000)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.catch(() => {\n\t\t\t\t\t\t\tif (!Array.isArray(appId)) {\n\t\t\t\t\t\t\t\tshowError(t('settings', 'Error: This app cannot be enabled because it makes the server unstable'))\n\t\t\t\t\t\t\t\tcontext.commit('setError', {\n\t\t\t\t\t\t\t\t\tappId: apps,\n\t\t\t\t\t\t\t\t\terror: t('settings', 'Error: This app cannot be enabled because it makes the server unstable'),\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t\tcontext.dispatch('disableApp', { appId })\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('setError', {\n\t\t\t\t\t\tappId: apps,\n\t\t\t\t\t\terror: error.response.data.data.message,\n\t\t\t\t\t})\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\tforceEnableApp(context, { appId, groups }) {\n\t\tlet apps\n\t\tif (Array.isArray(appId)) {\n\t\t\tapps = appId\n\t\t} else {\n\t\t\tapps = [appId]\n\t\t}\n\t\treturn api.requireAdmin().then(() => {\n\t\t\tcontext.commit('startLoading', apps)\n\t\t\tcontext.commit('startLoading', 'install')\n\t\t\treturn api.post(generateUrl('settings/apps/force'), { appId })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('setInstallState', { appId, canInstall: true })\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('setError', {\n\t\t\t\t\t\tappId: apps,\n\t\t\t\t\t\terror: error.response.data.data.message,\n\t\t\t\t\t})\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t\t\t.finally(() => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\tdisableApp(context, { appId }) {\n\t\tlet apps\n\t\tif (Array.isArray(appId)) {\n\t\t\tapps = appId\n\t\t} else {\n\t\t\tapps = [appId]\n\t\t}\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', apps)\n\t\t\treturn api.post(generateUrl('settings/apps/disable'), { appIds: apps })\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tapps.forEach(_appId => {\n\t\t\t\t\t\tcontext.commit('disableApp', _appId)\n\t\t\t\t\t})\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', apps)\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\tuninstallApp(context, { appId }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', appId)\n\t\t\treturn api.get(generateUrl(`settings/apps/uninstall/${appId}`))\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('uninstallApp', appId)\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\n\tupdateApp(context, { appId }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\tcontext.commit('startLoading', appId)\n\t\t\tcontext.commit('startLoading', 'install')\n\t\t\treturn api.get(generateUrl(`settings/apps/update/${appId}`))\n\t\t\t\t.then((response) => {\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('updateApp', appId)\n\t\t\t\t\treturn true\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tcontext.commit('stopLoading', appId)\n\t\t\t\t\tcontext.commit('stopLoading', 'install')\n\t\t\t\t\tcontext.commit('APPS_API_FAILURE', { appId, error })\n\t\t\t\t})\n\t\t}).catch((error) => context.commit('API_FAILURE', { appId, error }))\n\t},\n\n\tgetAllApps(context) {\n\t\tcontext.commit('startLoading', 'list')\n\t\treturn api.get(generateUrl('settings/apps/list'))\n\t\t\t.then((response) => {\n\t\t\t\tcontext.commit('setAllApps', response.data.apps)\n\t\t\t\tcontext.commit('stopLoading', 'list')\n\t\t\t\treturn true\n\t\t\t})\n\t\t\t.catch((error) => context.commit('API_FAILURE', error))\n\t},\n\n\tasync getCategories(context, { shouldRefetchCategories = false } = {}) {\n\t\tif (shouldRefetchCategories || !context.state.gettingCategoriesPromise) {\n\t\t\tcontext.commit('startLoading', 'categories')\n\t\t\ttry {\n\t\t\t\tconst categoriesPromise = api.get(generateUrl('settings/apps/categories'))\n\t\t\t\tcontext.commit('updateCategories', categoriesPromise)\n\t\t\t\tconst categoriesPromiseResponse = await categoriesPromise\n\t\t\t\tif (categoriesPromiseResponse.data.length > 0) {\n\t\t\t\t\tcontext.commit('appendCategories', categoriesPromiseResponse.data)\n\t\t\t\t\tcontext.commit('stopLoading', 'categories')\n\t\t\t\t\treturn true\n\t\t\t\t}\n\t\t\t\tcontext.commit('stopLoading', 'categories')\n\t\t\t\treturn false\n\t\t\t} catch (error) {\n\t\t\t\tcontext.commit('API_FAILURE', error)\n\t\t\t}\n\t\t}\n\t\treturn context.state.gettingCategoriesPromise\n\t},\n\n}\n\nexport default { state, mutations, getters, actions }\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { loadState } from '@nextcloud/initial-state'\n\nconst state = {\n\tserverData: loadState('settings', 'usersSettings', {}),\n}\nconst mutations = {\n\tsetServerData(state, data) {\n\t\tstate.serverData = data\n\t},\n}\nconst getters = {\n\tgetServerData(state) {\n\t\treturn state.serverData\n\t},\n}\nconst actions = {}\n\nexport default { state, mutations, getters, actions }\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport api from './api.js'\nimport { generateOcsUrl } from '@nextcloud/router'\n\nconst state = {}\nconst mutations = {}\nconst getters = {}\nconst actions = {\n\t/**\n\t * Set application config in database\n\t *\n\t * @param {object} context store context\n\t * @param {object} options destructuring object\n\t * @param {string} options.app Application name\n\t * @param {boolean} options.key Config key\n\t * @param {boolean} options.value Value to set\n\t * @return {Promise}\n\t */\n\tsetAppConfig(context, { app, key, value }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('apps/provisioning_api/api/v1/config/apps/{app}/{key}', { app, key }), { value })\n\t\t\t\t.catch((error) => { throw error })\n\t\t}).catch((error) => context.commit('API_FAILURE', { app, key, value, error }))\n\t},\n}\n\nexport default { state, mutations, getters, actions }\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport Vue from 'vue'\nimport Vuex, { Store } from 'vuex'\nimport users from './users.js'\nimport apps from './apps.js'\nimport settings from './users-settings.js'\nimport oc from './oc.js'\nimport { showError } from '@nextcloud/dialogs'\n\nVue.use(Vuex)\n\nconst debug = process.env.NODE_ENV !== 'production'\n\nconst mutations = {\n\tAPI_FAILURE(state, error) {\n\t\ttry {\n\t\t\tconst message = error.error.response.data.ocs.meta.message\n\t\t\tshowError(t('settings', 'An error occurred during the request. Unable to proceed.') + '<br>' + message, { isHTML: true })\n\t\t} catch (e) {\n\t\t\tshowError(t('settings', 'An error occurred during the request. Unable to proceed.'))\n\t\t}\n\t\tconsole.error(state, error)\n\t},\n}\n\nlet store = null\n\nexport const useStore = () => {\n\tif (store === null) {\n\t\tstore = new Store({\n\t\t\tmodules: {\n\t\t\t\tusers,\n\t\t\t\tapps,\n\t\t\t\tsettings,\n\t\t\t\toc,\n\t\t\t},\n\t\t\tstrict: debug,\n\t\t\tmutations,\n\t\t})\n\t}\n\treturn store\n}\n","/**\n * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport Vue from 'vue'\nimport VTooltip from 'v-tooltip'\nimport { sync } from 'vuex-router-sync'\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n'\n\nimport SettingsApp from './views/SettingsApp.vue'\nimport router from './router/index.ts'\nimport { useStore } from './store/index.js'\nimport { PiniaVuePlugin, createPinia } from 'pinia'\n\nVue.use(VTooltip, { defaultHtml: false })\n\nconst store = useStore()\nsync(store, router)\n\n// bind to window\nVue.prototype.t = t\nVue.prototype.n = n\nVue.use(PiniaVuePlugin)\n\nconst pinia = createPinia()\n\nexport default new Vue({\n\trouter,\n\tstore,\n\tpinia,\n\trender: h => h(SettingsApp),\n\tel: '#content',\n})\n"],"file":"settings-vue-settings-apps-users-management.mjs"}
|