nextcloud-server/dist/settings-users-8351.js

3 lines
77 KiB
JavaScript

/*! For license information please see settings-users-8351.js.LICENSE.txt */
"use strict";(self.webpackChunknextcloud=self.webpackChunknextcloud||[]).push([[8351],{71838:function(t,e,s){var n=s(87537),i=s.n(n),a=s(23645),r=s.n(a)()(i());r.push([t.id,".row--menu-opened[data-v-573e6411]{z-index:1 !important}.row[data-v-573e6411] .multiselect__single{z-index:auto !important}","",{version:3,sources:["webpack://./apps/settings/src/components/UserList/UserRow.vue"],names:[],mappings:"AAEA,mCACC,oBAAA,CAED,2CACC,uBAAA",sourcesContent:["\n// Force menu to be above other rows\n.row--menu-opened {\n\tz-index: 1 !important;\n}\n.row::v-deep .multiselect__single {\n\tz-index: auto !important;\n}\n"],sourceRoot:""}]),e.Z=r},78836:function(t,e,s){var n=s(87537),i=s.n(n),a=s(23645),r=s.n(a)()(i());r.push([t.id,".cellText{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.icon-more{background-color:var(--color-main-background);border:0}","",{version:3,sources:["webpack://./apps/settings/src/components/UserList/UserRowSimple.vue"],names:[],mappings:"AACC,UACC,eAAA,CACA,sBAAA,CACA,kBAAA,CAED,WACC,6CAAA,CACA,QAAA",sourcesContent:["\n\t.cellText {\n\t\toverflow: hidden;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n}\n\t.icon-more {\n\t\tbackground-color: var(--color-main-background);\n\t\tborder: 0;\n\t}\n"],sourceRoot:""}]),e.Z=r},68430:function(t,e,s){var n=s(87537),i=s.n(n),a=s(23645),r=s.n(a)()(i());r.push([t.id,".app-navigation__list #addgroup[data-v-7004587b] .app-navigation-entry__utils{display:none}","",{version:3,sources:["webpack://./apps/settings/src/views/Users.vue"],names:[],mappings:"AAEA,8EACC,YAAA",sourcesContent:["\n// force hiding the editing action for the add group entry\n.app-navigation__list #addgroup::v-deep .app-navigation-entry__utils {\n\tdisplay: none;\n}\n"],sourceRoot:""}]),e.Z=r},47407:function(t,e,s){var n=s(87537),i=s.n(n),a=s(23645),r=s.n(a)()(i());r.push([t.id,'\n.modal-wrapper[data-v-09961579] {\n\tmargin: 2vh 0;\n\talign-items: flex-start;\n}\n.modal__content[data-v-09961579] {\n\tdisplay: flex;\n\tpadding: 20px;\n\tflex-direction: column;\n\talign-items: center;\n\ttext-align: center;\n}\n.modal__item[data-v-09961579] {\n\tmargin-bottom: 16px;\n\twidth: 100%;\n}\n.modal__item[data-v-09961579]:not(:focus):not(:active) {\n\tborder-color: var(--color-border-dark);\n}\n.modal__item[data-v-09961579] .multiselect {\n\twidth: 100%;\n}\n.user-actions[data-v-09961579] {\n\tmargin-top: 20px;\n}\n.modal__content[data-v-09961579] .multiselect__single {\n\ttext-align: left;\n\tbox-sizing: border-box;\n}\n.modal__content[data-v-09961579] .multiselect__content-wrapper {\n\tbox-sizing: border-box;\n}\n.row[data-v-09961579] .multiselect__single {\n\tz-index: auto !important;\n}\n\n/* fake input for groups validation */\ninput#newgroups[data-v-09961579] {\n\tposition: absolute;\n\topacity: 0;\n\t/* The "hidden" input is behind the Multiselect, so in general it does\n\t * not receives clicks. However, with Firefox, after the validation\n\t * fails, it will receive the first click done on it, so its width needs\n\t * to be set to 0 to prevent that ("pointer-events: none" does not\n\t * prevent it). */\n\twidth: 0;\n}\n',"",{version:3,sources:["webpack://./apps/settings/src/components/UserList.vue"],names:[],mappings:";AAsoBA;CACA,aAAA;CACA,uBAAA;AACA;AACA;CACA,aAAA;CACA,aAAA;CACA,sBAAA;CACA,mBAAA;CACA,kBAAA;AACA;AACA;CACA,mBAAA;CACA,WAAA;AACA;AACA;CACA,sCAAA;AACA;AACA;CACA,WAAA;AACA;AACA;CACA,gBAAA;AACA;AACA;CACA,gBAAA;CACA,sBAAA;AACA;AACA;CACA,sBAAA;AACA;AACA;CACA,wBAAA;AACA;;AAEA,qCAAA;AACA;CACA,kBAAA;CACA,UAAA;CACA;;;;kBAIA;CACA,QAAA;AACA",sourcesContent:['\x3c!--\n - @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @author John Molakvoæ <skjnldsv@protonmail.com>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n --\x3e\n\n<template>\n\t<div id="app-content" class="user-list-grid" @scroll.passive="onScroll">\n\t\t<NcModal v-if="showConfig.showNewUserForm" size="small" @close="closeModal">\n\t\t\t<form id="new-user"\n\t\t\t\t:disabled="loading.all"\n\t\t\t\tclass="modal__content"\n\t\t\t\t@submit.prevent="createUser">\n\t\t\t\t<h2>{{ t(\'settings\',\'New user\') }}</h2>\n\t\t\t\t<input id="newusername"\n\t\t\t\t\tref="newusername"\n\t\t\t\t\tv-model="newUser.id"\n\t\t\t\t\t:disabled="settings.newUserGenerateUserID"\n\t\t\t\t\t:placeholder="settings.newUserGenerateUserID\n\t\t\t\t\t\t? t(\'settings\', \'Will be autogenerated\')\n\t\t\t\t\t\t: t(\'settings\', \'Username\')"\n\t\t\t\t\tautocapitalize="none"\n\t\t\t\t\tautocomplete="off"\n\t\t\t\t\tautocorrect="off"\n\t\t\t\t\tclass="modal__item"\n\t\t\t\t\tname="username"\n\t\t\t\t\tpattern="[a-zA-Z0-9 _\\.@\\-\']+"\n\t\t\t\t\trequired\n\t\t\t\t\ttype="text">\n\t\t\t\t<input id="newdisplayname"\n\t\t\t\t\tv-model="newUser.displayName"\n\t\t\t\t\t:placeholder="t(\'settings\', \'Display name\')"\n\t\t\t\t\tautocapitalize="none"\n\t\t\t\t\tautocomplete="off"\n\t\t\t\t\tautocorrect="off"\n\t\t\t\t\tclass="modal__item"\n\t\t\t\t\tname="displayname"\n\t\t\t\t\ttype="text">\n\t\t\t\t<input id="newuserpassword"\n\t\t\t\t\tref="newuserpassword"\n\t\t\t\t\tv-model="newUser.password"\n\t\t\t\t\t:minlength="minPasswordLength"\n\t\t\t\t\t:maxlength="469"\n\t\t\t\t\t:placeholder="t(\'settings\', \'Password\')"\n\t\t\t\t\t:required="newUser.mailAddress===\'\'"\n\t\t\t\t\tautocapitalize="none"\n\t\t\t\t\tautocomplete="new-password"\n\t\t\t\t\tautocorrect="off"\n\t\t\t\t\tclass="modal__item"\n\t\t\t\t\tname="password"\n\t\t\t\t\ttype="password">\n\t\t\t\t<input id="newemail"\n\t\t\t\t\tv-model="newUser.mailAddress"\n\t\t\t\t\t:placeholder="t(\'settings\', \'Email\')"\n\t\t\t\t\t:required="newUser.password===\'\' || settings.newUserRequireEmail"\n\t\t\t\t\tautocapitalize="none"\n\t\t\t\t\tautocomplete="off"\n\t\t\t\t\tautocorrect="off"\n\t\t\t\t\tclass="modal__item"\n\t\t\t\t\tname="email"\n\t\t\t\t\ttype="email">\n\t\t\t\t<div class="groups modal__item">\n\t\t\t\t\t\x3c!-- hidden input trick for vanilla html5 form validation --\x3e\n\t\t\t\t\t<input v-if="!settings.isAdmin"\n\t\t\t\t\t\tid="newgroups"\n\t\t\t\t\t\t:class="{\'icon-loading-small\': loading.groups}"\n\t\t\t\t\t\t:required="!settings.isAdmin"\n\t\t\t\t\t\t:value="newUser.groups"\n\t\t\t\t\t\ttabindex="-1"\n\t\t\t\t\t\ttype="text">\n\t\t\t\t\t<NcMultiselect v-model="newUser.groups"\n\t\t\t\t\t\t:close-on-select="false"\n\t\t\t\t\t\t:disabled="loading.groups||loading.all"\n\t\t\t\t\t\t:multiple="true"\n\t\t\t\t\t\t:options="canAddGroups"\n\t\t\t\t\t\t:placeholder="t(\'settings\', \'Add user to group\')"\n\t\t\t\t\t\t:tag-width="60"\n\t\t\t\t\t\t:taggable="true"\n\t\t\t\t\t\tclass="multiselect-vue"\n\t\t\t\t\t\tlabel="name"\n\t\t\t\t\t\ttag-placeholder="create"\n\t\t\t\t\t\ttrack-by="id"\n\t\t\t\t\t\t@tag="createGroup">\n\t\t\t\t\t\t\x3c!-- If user is not admin, he is a subadmin.\n\t\t\t\t\t\t\tSubadmins can\'t create users outside their groups\n\t\t\t\t\t\t\tTherefore, empty select is forbidden --\x3e\n\t\t\t\t\t\t<span slot="noResult">{{ t(\'settings\', \'No results\') }}</span>\n\t\t\t\t\t</NcMultiselect>\n\t\t\t\t</div>\n\t\t\t\t<div v-if="subAdminsGroups.length>0 && settings.isAdmin"\n\t\t\t\t\tclass="subadmins modal__item">\n\t\t\t\t\t<NcMultiselect v-model="newUser.subAdminsGroups"\n\t\t\t\t\t\t:close-on-select="false"\n\t\t\t\t\t\t:multiple="true"\n\t\t\t\t\t\t:options="subAdminsGroups"\n\t\t\t\t\t\t:placeholder="t(\'settings\', \'Set user as admin for\')"\n\t\t\t\t\t\t:tag-width="60"\n\t\t\t\t\t\tclass="multiselect-vue"\n\t\t\t\t\t\tlabel="name"\n\t\t\t\t\t\ttrack-by="id">\n\t\t\t\t\t\t<span slot="noResult">{{ t(\'settings\', \'No results\') }}</span>\n\t\t\t\t\t</NcMultiselect>\n\t\t\t\t</div>\n\t\t\t\t<div class="quota modal__item">\n\t\t\t\t\t<NcMultiselect v-model="newUser.quota"\n\t\t\t\t\t\t:allow-empty="false"\n\t\t\t\t\t\t:options="quotaOptions"\n\t\t\t\t\t\t:placeholder="t(\'settings\', \'Select user quota\')"\n\t\t\t\t\t\t:taggable="true"\n\t\t\t\t\t\tclass="multiselect-vue"\n\t\t\t\t\t\tlabel="label"\n\t\t\t\t\t\ttrack-by="id"\n\t\t\t\t\t\t@tag="validateQuota" />\n\t\t\t\t</div>\n\t\t\t\t<div v-if="showConfig.showLanguages" class="languages modal__item">\n\t\t\t\t\t<NcMultiselect v-model="newUser.language"\n\t\t\t\t\t\t:allow-empty="false"\n\t\t\t\t\t\t:options="languages"\n\t\t\t\t\t\t:placeholder="t(\'settings\', \'Default language\')"\n\t\t\t\t\t\tclass="multiselect-vue"\n\t\t\t\t\t\tgroup-label="label"\n\t\t\t\t\t\tgroup-values="languages"\n\t\t\t\t\t\tlabel="name"\n\t\t\t\t\t\ttrack-by="code" />\n\t\t\t\t</div>\n\t\t\t\t<div v-if="showConfig.showStoragePath" class="storageLocation" />\n\t\t\t\t<div v-if="showConfig.showUserBackend" class="userBackend" />\n\t\t\t\t<div v-if="showConfig.showLastLogin" class="lastLogin" />\n\t\t\t\t<div class="user-actions">\n\t\t\t\t\t<NcButton id="newsubmit"\n\t\t\t\t\t\ttype="primary"\n\t\t\t\t\t\tnative-type="submit"\n\t\t\t\t\t\tvalue="">\n\t\t\t\t\t\t{{ t(\'settings\', \'Add a new user\') }}\n\t\t\t\t\t</NcButton>\n\t\t\t\t</div>\n\t\t\t</form>\n\t\t</NcModal>\n\t\t<div id="grid-header"\n\t\t\t:class="{\'sticky\': scrolled && !showConfig.showNewUserForm}"\n\t\t\tclass="row">\n\t\t\t<div id="headerAvatar" class="avatar" />\n\t\t\t<div id="headerName" class="name">\n\t\t\t\t<div class="subtitle">\n\t\t\t\t\t<strong>\n\t\t\t\t\t\t{{ t(\'settings\', \'Display name\') }}\n\t\t\t\t\t</strong>\n\t\t\t\t</div>\n\t\t\t\t{{ t(\'settings\', \'Username\') }}\n\t\t\t</div>\n\t\t\t<div id="headerPassword" class="password">\n\t\t\t\t{{ t(\'settings\', \'Password\') }}\n\t\t\t</div>\n\t\t\t<div id="headerAddress" class="mailAddress">\n\t\t\t\t{{ t(\'settings\', \'Email\') }}\n\t\t\t</div>\n\t\t\t<div id="headerGroups" class="groups">\n\t\t\t\t{{ t(\'settings\', \'Groups\') }}\n\t\t\t</div>\n\t\t\t<div v-if="subAdminsGroups.length>0 && settings.isAdmin"\n\t\t\t\tid="headerSubAdmins"\n\t\t\t\tclass="subadmins">\n\t\t\t\t{{ t(\'settings\', \'Group admin for\') }}\n\t\t\t</div>\n\t\t\t<div id="headerQuota" class="quota">\n\t\t\t\t{{ t(\'settings\', \'Quota\') }}\n\t\t\t</div>\n\t\t\t<div v-if="showConfig.showLanguages"\n\t\t\t\tid="headerLanguages"\n\t\t\t\tclass="languages">\n\t\t\t\t{{ t(\'settings\', \'Language\') }}\n\t\t\t</div>\n\n\t\t\t<div v-if="showConfig.showUserBackend || showConfig.showStoragePath"\n\t\t\t\tclass="headerUserBackend userBackend">\n\t\t\t\t<div v-if="showConfig.showUserBackend" class="userBackend">\n\t\t\t\t\t{{ t(\'settings\', \'User backend\') }}\n\t\t\t\t</div>\n\t\t\t\t<div v-if="showConfig.showStoragePath"\n\t\t\t\t\tclass="subtitle storageLocation">\n\t\t\t\t\t{{ t(\'settings\', \'Storage location\') }}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div v-if="showConfig.showLastLogin"\n\t\t\t\tclass="headerLastLogin lastLogin">\n\t\t\t\t{{ t(\'settings\', \'Last login\') }}\n\t\t\t</div>\n\n\t\t\t<div class="userActions" />\n\t\t</div>\n\n\t\t<user-row v-for="user in filteredUsers"\n\t\t\t:key="user.id"\n\t\t\t:external-actions="externalActions"\n\t\t\t:groups="groups"\n\t\t\t:languages="languages"\n\t\t\t:quota-options="quotaOptions"\n\t\t\t:settings="settings"\n\t\t\t:show-config="showConfig"\n\t\t\t:sub-admins-groups="subAdminsGroups"\n\t\t\t:user="user"\n\t\t\t:is-dark-theme="isDarkTheme" />\n\t\t<InfiniteLoading ref="infiniteLoading" @infinite="infiniteHandler">\n\t\t\t<div slot="spinner">\n\t\t\t\t<div class="users-icon-loading icon-loading" />\n\t\t\t</div>\n\t\t\t<div slot="no-more">\n\t\t\t\t<div class="users-list-end" />\n\t\t\t</div>\n\t\t\t<div slot="no-results">\n\t\t\t\t<div id="emptycontent">\n\t\t\t\t\t<div class="icon-contacts-dark" />\n\t\t\t\t\t<h2>{{ t(\'settings\', \'No users in here\') }}</h2>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</InfiniteLoading>\n\t</div>\n</template>\n\n<script>\nimport { subscribe, unsubscribe } from \'@nextcloud/event-bus\'\nimport InfiniteLoading from \'vue-infinite-loading\'\nimport Vue from \'vue\'\nimport NcModal from \'@nextcloud/vue/dist/Components/NcModal\'\nimport NcButton from \'@nextcloud/vue/dist/Components/NcButton\'\nimport NcMultiselect from \'@nextcloud/vue/dist/Components/NcMultiselect\'\n\nimport userRow from \'./UserList/UserRow\'\n\nconst unlimitedQuota = {\n\tid: \'none\',\n\tlabel: t(\'settings\', \'Unlimited\'),\n}\nconst defaultQuota = {\n\tid: \'default\',\n\tlabel: t(\'settings\', \'Default quota\'),\n}\nconst newUser = {\n\tid: \'\',\n\tdisplayName: \'\',\n\tpassword: \'\',\n\tmailAddress: \'\',\n\tgroups: [],\n\tsubAdminsGroups: [],\n\tquota: defaultQuota,\n\tlanguage: {\n\t\tcode: \'en\',\n\t\tname: t(\'settings\', \'Default language\'),\n\t},\n}\n\nexport default {\n\tname: \'UserList\',\n\tcomponents: {\n\t\tNcModal,\n\t\tuserRow,\n\t\tNcMultiselect,\n\t\tInfiniteLoading,\n\t\tNcButton,\n\t},\n\tprops: {\n\t\tusers: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\t\tshowConfig: {\n\t\t\ttype: Object,\n\t\t\trequired: true,\n\t\t},\n\t\tselectedGroup: {\n\t\t\ttype: String,\n\t\t\tdefault: null,\n\t\t},\n\t\texternalActions: {\n\t\t\ttype: Array,\n\t\t\tdefault: () => [],\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tunlimitedQuota,\n\t\t\tdefaultQuota,\n\t\t\tloading: {\n\t\t\t\tall: false,\n\t\t\t\tgroups: false,\n\t\t\t},\n\t\t\tscrolled: false,\n\t\t\tsearchQuery: \'\',\n\t\t\tnewUser: Object.assign({}, newUser),\n\t\t}\n\t},\n\tcomputed: {\n\t\tsettings() {\n\t\t\treturn this.$store.getters.getServerData\n\t\t},\n\t\tselectedGroupDecoded() {\n\t\t\treturn decodeURIComponent(this.selectedGroup)\n\t\t},\n\t\tfilteredUsers() {\n\t\t\tif (this.selectedGroup === \'disabled\') {\n\t\t\t\treturn this.users.filter(user => user.enabled === false)\n\t\t\t}\n\t\t\tif (!this.settings.isAdmin) {\n\t\t\t\t// we don\'t want subadmins to edit themselves\n\t\t\t\treturn this.users.filter(user => user.enabled !== false)\n\t\t\t}\n\t\t\treturn this.users.filter(user => user.enabled !== false)\n\t\t},\n\t\tgroups() {\n\t\t\t// data provided php side + remove the disabled group\n\t\t\treturn this.$store.getters.getGroups\n\t\t\t\t.filter(group => group.id !== \'disabled\')\n\t\t\t\t.sort((a, b) => a.name.localeCompare(b.name))\n\t\t},\n\t\tcanAddGroups() {\n\t\t\t// disabled if no permission to add new users to group\n\t\t\treturn this.groups.map(group => {\n\t\t\t\t// clone object because we don\'t want\n\t\t\t\t// to edit the original groups\n\t\t\t\tgroup = Object.assign({}, group)\n\t\t\t\tgroup.$isDisabled = group.canAdd === false\n\t\t\t\treturn group\n\t\t\t})\n\t\t},\n\t\tsubAdminsGroups() {\n\t\t\t// data provided php side\n\t\t\treturn this.$store.getters.getSubadminGroups\n\t\t},\n\t\tquotaOptions() {\n\t\t\t// convert the preset array into objects\n\t\t\tconst quotaPreset = this.settings.quotaPreset.reduce((acc, cur) => acc.concat({\n\t\t\t\tid: cur,\n\t\t\t\tlabel: cur,\n\t\t\t}), [])\n\t\t\t// add default presets\n\t\t\tif (this.settings.allowUnlimitedQuota) {\n\t\t\t\tquotaPreset.unshift(this.unlimitedQuota)\n\t\t\t}\n\t\t\tquotaPreset.unshift(this.defaultQuota)\n\t\t\treturn quotaPreset\n\t\t},\n\t\tminPasswordLength() {\n\t\t\treturn this.$store.getters.getPasswordPolicyMinLength\n\t\t},\n\t\tusersOffset() {\n\t\t\treturn this.$store.getters.getUsersOffset\n\t\t},\n\t\tusersLimit() {\n\t\t\treturn this.$store.getters.getUsersLimit\n\t\t},\n\t\tusersCount() {\n\t\t\treturn this.users.length\n\t\t},\n\n\t\t/* LANGUAGES */\n\t\tlanguages() {\n\t\t\treturn [\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\'settings\', \'Common languages\'),\n\t\t\t\t\tlanguages: this.settings.languages.commonLanguages,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: t(\'settings\', \'Other languages\'),\n\t\t\t\t\tlanguages: this.settings.languages.otherLanguages,\n\t\t\t\t},\n\t\t\t]\n\t\t},\n\t\tisDarkTheme() {\n\t\t\treturn window.getComputedStyle(this.$el)\n\t\t\t\t.getPropertyValue(\'--background-invert-if-dark\') === \'invert(100%)\'\n\t\t},\n\t},\n\twatch: {\n\t\t// watch url change and group select\n\t\tselectedGroup(val, old) {\n\t\t\t// if selected is the disabled group but it\'s empty\n\t\t\tthis.redirectIfDisabled()\n\t\t\tthis.$store.commit(\'resetUsers\')\n\t\t\tthis.$refs.infiniteLoading.stateChanger.reset()\n\t\t\tthis.setNewUserDefaultGroup(val)\n\t\t},\n\n\t\t// make sure the infiniteLoading state is changed if we manually\n\t\t// add/remove data from the store\n\t\tusersCount(val, old) {\n\t\t\t// deleting the last user, reset the list\n\t\t\tif (val === 0 && old === 1) {\n\t\t\t\tthis.$refs.infiniteLoading.stateChanger.reset()\n\t\t\t\t// adding the first user, warn the infiniteLoader that\n\t\t\t\t// the list is not empty anymore (we don\'t fetch the newly\n\t\t\t\t// added user as we already have all the info we need)\n\t\t\t} else if (val === 1 && old === 0) {\n\t\t\t\tthis.$refs.infiniteLoading.stateChanger.loaded()\n\t\t\t}\n\t\t},\n\t},\n\n\tmounted() {\n\t\tif (!this.settings.canChangePassword) {\n\t\t\tOC.Notification.showTemporary(t(\'settings\', \'Password change is disabled because the master key is disabled\'))\n\t\t}\n\n\t\t/**\n\t\t * Reset and init new user form\n\t\t */\n\t\tthis.resetForm()\n\n\t\t/**\n\t\t * Register search\n\t\t */\n\t\tsubscribe(\'nextcloud:unified-search.search\', this.search)\n\t\tsubscribe(\'nextcloud:unified-search.reset\', this.resetSearch)\n\n\t\t/**\n\t\t * If disabled group but empty, redirect\n\t\t */\n\t\tthis.redirectIfDisabled()\n\t},\n\tbeforeDestroy() {\n\t\tunsubscribe(\'nextcloud:unified-search.search\', this.search)\n\t\tunsubscribe(\'nextcloud:unified-search.reset\', this.resetSearch)\n\t},\n\n\tmethods: {\n\t\tonScroll(event) {\n\t\t\tthis.scrolled = event.target.scrollTo > 0\n\t\t},\n\n\t\t/**\n\t\t * Validate quota string to make sure it\'s a valid human file size\n\t\t *\n\t\t * @param {string} quota Quota in readable format \'5 GB\'\n\t\t * @return {object}\n\t\t */\n\t\tvalidateQuota(quota) {\n\t\t\t// only used for new presets sent through @Tag\n\t\t\tconst validQuota = OC.Util.computerFileSize(quota)\n\t\t\tif (validQuota !== null && validQuota >= 0) {\n\t\t\t\t// unify format output\n\t\t\t\tquota = OC.Util.humanFileSize(OC.Util.computerFileSize(quota))\n\t\t\t\tthis.newUser.quota = { id: quota, label: quota }\n\t\t\t\treturn this.newUser.quota\n\t\t\t}\n\t\t\t// Default is unlimited\n\t\t\tthis.newUser.quota = this.quotaOptions[0]\n\t\t\treturn this.quotaOptions[0]\n\t\t},\n\n\t\tinfiniteHandler($state) {\n\t\t\tthis.$store.dispatch(\'getUsers\', {\n\t\t\t\toffset: this.usersOffset,\n\t\t\t\tlimit: this.usersLimit,\n\t\t\t\tgroup: this.selectedGroup !== \'disabled\' ? this.selectedGroup : \'\',\n\t\t\t\tsearch: this.searchQuery,\n\t\t\t})\n\t\t\t\t.then((usersCount) => {\n\t\t\t\t\tif (usersCount > 0) {\n\t\t\t\t\t\t$state.loaded()\n\t\t\t\t\t}\n\t\t\t\t\tif (usersCount < this.usersLimit) {\n\t\t\t\t\t\t$state.complete()\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t},\n\n\t\t/* SEARCH */\n\t\tsearch({ query }) {\n\t\t\tthis.searchQuery = query\n\t\t\tthis.$store.commit(\'resetUsers\')\n\t\t\tthis.$refs.infiniteLoading.stateChanger.reset()\n\t\t},\n\t\tresetSearch() {\n\t\t\tthis.search({ query: \'\' })\n\t\t},\n\n\t\tresetForm() {\n\t\t\t// revert form to original state\n\t\t\tthis.newUser = Object.assign({}, newUser)\n\n\t\t\t/**\n\t\t\t * Init default language from server data. The use of this.settings\n\t\t\t * requires a computed variable, which break the v-model binding of the form,\n\t\t\t * this is a much easier solution than getter and setter on a computed var\n\t\t\t */\n\t\t\tif (this.settings.defaultLanguage) {\n\t\t\t\tVue.set(this.newUser.language, \'code\', this.settings.defaultLanguage)\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * In case the user directly loaded the user list within a group\n\t\t\t * the watch won\'t be triggered. We need to initialize it.\n\t\t\t */\n\t\t\tthis.setNewUserDefaultGroup(this.selectedGroup)\n\n\t\t\tthis.loading.all = false\n\t\t},\n\t\tcreateUser() {\n\t\t\tthis.loading.all = true\n\t\t\tthis.$store.dispatch(\'addUser\', {\n\t\t\t\tuserid: this.newUser.id,\n\t\t\t\tpassword: this.newUser.password,\n\t\t\t\tdisplayName: this.newUser.displayName,\n\t\t\t\temail: this.newUser.mailAddress,\n\t\t\t\tgroups: this.newUser.groups.map(group => group.id),\n\t\t\t\tsubadmin: this.newUser.subAdminsGroups.map(group => group.id),\n\t\t\t\tquota: this.newUser.quota.id,\n\t\t\t\tlanguage: this.newUser.language.code,\n\t\t\t})\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.resetForm()\n\t\t\t\t\tthis.$refs.newusername.focus()\n\t\t\t\t\tthis.closeModal()\n\t\t\t\t})\n\t\t\t\t.catch((error) => {\n\t\t\t\t\tthis.loading.all = false\n\t\t\t\t\tif (error.response && error.response.data && error.response.data.ocs && error.response.data.ocs.meta) {\n\t\t\t\t\t\tconst statuscode = error.response.data.ocs.meta.statuscode\n\t\t\t\t\t\tif (statuscode === 102) {\n\t\t\t\t\t\t\t// wrong username\n\t\t\t\t\t\t\tthis.$refs.newusername.focus()\n\t\t\t\t\t\t} else if (statuscode === 107) {\n\t\t\t\t\t\t\t// wrong password\n\t\t\t\t\t\t\tthis.$refs.newuserpassword.focus()\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t},\n\t\tsetNewUserDefaultGroup(value) {\n\t\t\tif (value && value.length > 0) {\n\t\t\t\t// setting new user default group to the current selected one\n\t\t\t\tconst currentGroup = this.groups.find(group => group.id === value)\n\t\t\t\tif (currentGroup) {\n\t\t\t\t\tthis.newUser.groups = [currentGroup]\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\t\t\t// fallback, empty selected group\n\t\t\tthis.newUser.groups = []\n\t\t},\n\n\t\t/**\n\t\t * Create a new group\n\t\t *\n\t\t * @param {string} gid Group id\n\t\t * @return {Promise}\n\t\t */\n\t\tcreateGroup(gid) {\n\t\t\tthis.loading.groups = true\n\t\t\tthis.$store.dispatch(\'addGroup\', gid)\n\t\t\t\t.then((group) => {\n\t\t\t\t\tthis.newUser.groups.push(this.groups.find(group => group.id === gid))\n\t\t\t\t\tthis.loading.groups = false\n\t\t\t\t})\n\t\t\t\t.catch(() => {\n\t\t\t\t\tthis.loading.groups = false\n\t\t\t\t})\n\t\t\treturn this.$store.getters.getGroups[this.groups.length]\n\t\t},\n\n\t\t/**\n\t\t * If the selected group is the disabled group but the count is 0\n\t\t * redirect to the all users page.\n\t\t * we only check for 0 because we don\'t have the count on ldap\n\t\t * and we therefore set the usercount to -1 in this specific case\n\t\t */\n\t\tredirectIfDisabled() {\n\t\t\tconst allGroups = this.$store.getters.getGroups\n\t\t\tif (this.selectedGroup === \'disabled\'\n\t\t\t\t\t\t&& allGroups.findIndex(group => group.id === \'disabled\' && group.usercount === 0) > -1) {\n\t\t\t\t// disabled group is empty, redirection to all users\n\t\t\t\tthis.$router.push({ name: \'users\' })\n\t\t\t\tthis.$refs.infiniteLoading.stateChanger.reset()\n\t\t\t}\n\t\t},\n\t\tcloseModal() {\n\t\t\t// eslint-disable-next-line vue/no-mutating-props\n\t\t\tthis.showConfig.showNewUserForm = false\n\t\t},\n\t},\n}\n<\/script>\n<style scoped>\n\t.modal-wrapper {\n\t\tmargin: 2vh 0;\n\t\talign-items: flex-start;\n\t}\n\t.modal__content {\n\t\tdisplay: flex;\n\t\tpadding: 20px;\n\t\tflex-direction: column;\n\t\talign-items: center;\n\t\ttext-align: center;\n\t}\n\t.modal__item {\n\t\tmargin-bottom: 16px;\n\t\twidth: 100%;\n\t}\n\t.modal__item:not(:focus):not(:active) {\n\t\tborder-color: var(--color-border-dark);\n\t}\n\t.modal__item::v-deep .multiselect {\n\t\twidth: 100%;\n\t}\n\t.user-actions {\n\t\tmargin-top: 20px;\n\t}\n\t.modal__content::v-deep .multiselect__single {\n\t\ttext-align: left;\n\t\tbox-sizing: border-box;\n\t}\n\t.modal__content::v-deep .multiselect__content-wrapper {\n\t\tbox-sizing: border-box;\n\t}\n\t.row::v-deep .multiselect__single {\n\t\tz-index: auto !important;\n\t}\n\n\t/* fake input for groups validation */\n\tinput#newgroups {\n\t\tposition: absolute;\n\t\topacity: 0;\n\t\t/* The "hidden" input is behind the Multiselect, so in general it does\n\t\t * not receives clicks. However, with Firefox, after the validation\n\t\t * fails, it will receive the first click done on it, so its width needs\n\t\t * to be set to 0 to prevent that ("pointer-events: none" does not\n\t\t * prevent it). */\n\t\twidth: 0;\n\t}\n</style>\n'],sourceRoot:""}]),e.Z=r},82883:function(e,s,n){n.r(s),n.d(s,{default:function(){return Zt}});var i=n(69680),a=n.n(i),r=n(55209),o=n.n(r),u=n(88696),l=n.n(u),d=n(53110),c=n.n(d),g=n(14032),p=n.n(g),h=n(73190),m=n.n(h),f=n(93041),v=n.n(f),w=n(4820),b=n(27472),A=n.n(b),y=n(79753),C=n(98266),_=n.n(C),U=n(20144),k=n(87369),N=n.n(k),L=n(79570),x=n.n(L),G=n(45400),S=n.n(G),M=n(97039),q=n.n(M);function $(t,e,s,n,i,a,r){try{var o=t[a](r),u=o.value}catch(t){return void s(t)}o.done?e(u):Promise.resolve(u).then(n,i)}var O={name:"GroupListItem",components:{NcActionInput:x(),NcActionButton:S(),NcCounterBubble:q(),NcAppNavigationItem:p()},props:{id:{type:String,required:!0},title:{type:String,required:!0},count:{type:Number,required:!1}},data:function(){return{loadingRenameGroup:!1,openGroupMenu:!1}},computed:{settings:function(){return this.$store.getters.getServerData}},methods:{handleGroupMenuOpen:function(){this.openGroupMenu=!0},renameGroup:function(t){var e,s=this;return(e=regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==t.trim()){e.next=2;break}return e.abrupt("return");case 2:if(""!==(n=s.$refs.displayNameInput.$el.querySelector('input[type="text"]').value).trim()){e.next=5;break}return e.abrupt("return");case 5:return e.prev=5,s.openGroupMenu=!1,s.loadingRenameGroup=!0,e.next=10,s.$store.dispatch("renameGroup",{groupid:t.trim(),displayName:n.trim()});case 10:s.loadingRenameGroup=!1,e.next=17;break;case 13:e.prev=13,e.t0=e.catch(5),s.openGroupMenu=!0,s.loadingRenameGroup=!1;case 17:case"end":return e.stop()}}),e,null,[[5,13]])})),function(){var t=this,s=arguments;return new Promise((function(n,i){var a=e.apply(t,s);function r(t){$(a,n,i,r,o,"next",t)}function o(t){$(a,n,i,r,o,"throw",t)}r(void 0)}))})()},removeGroup:function(e){var s=this;OC.dialogs.confirm(t("settings","You are about to remove the group {group}. The users will NOT be deleted.",{group:e}),t("settings","Please confirm the group removal "),(function(t){t&&s.$store.dispatch("removeGroup",e)}))}}},P=O,D=n(51900),B=(0,D.Z)(P,(function(){var t=this,e=t._self._c;return e("NcAppNavigationItem",{key:t.id,attrs:{exact:!0,title:t.title,to:{name:"group",params:{selectedGroup:encodeURIComponent(t.id)}},icon:"icon-group",loading:t.loadingRenameGroup,"menu-open":t.openGroupMenu},on:{"update:menuOpen":t.handleGroupMenuOpen},scopedSlots:t._u([{key:"counter",fn:function(){return[t.count?e("NcCounterBubble",[t._v("\n\t\t\t"+t._s(t.count)+"\n\t\t")]):t._e()]},proxy:!0},{key:"actions",fn:function(){return["admin"!==t.id&&"disabled"!==t.id&&t.settings.isAdmin?e("NcActionInput",{ref:"displayNameInput",attrs:{icon:"icon-edit",type:"text",value:t.title},on:{submit:function(e){return t.renameGroup(t.id)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Rename group"))+"\n\t\t")]):t._e(),t._v(" "),"admin"!==t.id&&"disabled"!==t.id&&t.settings.isAdmin?e("NcActionButton",{attrs:{icon:"icon-delete"},on:{click:function(e){return t.removeGroup(t.id)}}},[t._v("\n\t\t\t"+t._s(t.t("settings","Remove group"))+"\n\t\t")]):t._e()]},proxy:!0}])})}),[],!1,null,null,null).exports,R=n(78595),Q=n(30306),z=n.n(Q),I=n(70110),T=n.n(I),F=n(10861),j=n.n(F),E=n(2649),Z=n.n(E),W=n(34741),H=n(15961),Y=n(32996),V=n.n(Y),J=n(12945),K=n.n(J),X=n(45994);function tt(t){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(t)}var et={props:{user:{type:Object,required:!0},settings:{type:Object,default:function(){return{}}},groups:{type:Array,default:function(){return[]}},subAdminsGroups:{type:Array,default:function(){return[]}},quotaOptions:{type:Array,default:function(){return[]}},showConfig:{type:Object,default:function(){return{}}},languages:{type:Array,required:!0},externalActions:{type:Array,default:function(){return[]}}},computed:{userGroups:function(){var t=this;return this.groups.filter((function(e){return t.user.groups.includes(e.id)}))},userSubAdminsGroups:function(){var t=this;return this.subAdminsGroups.filter((function(e){return t.user.subadmin.includes(e.id)}))},availableGroups:function(){var t=this;return this.groups.map((function(e){var s=Object.assign({},e);return s.$isDisabled=!1===e.canAdd&&!t.user.groups.includes(e.id)||!1===e.canRemove&&t.user.groups.includes(e.id),s}))},usedSpace:function(){return this.user.quota.used?t("settings","{size} used",{size:OC.Util.humanFileSize(this.user.quota.used)}):t("settings","{size} used",{size:OC.Util.humanFileSize(0)})},usedQuota:function(){var t=this.user.quota.quota;return t=t>0?Math.min(100,Math.round(this.user.quota.used/t*100)):95*(1-1/(this.user.quota.used/(10*Math.pow(2,30))+1)),isNaN(t)?0:t},userQuota:function(){if(this.user.quota.quota>=0){var t=OC.Util.humanFileSize(this.user.quota.quota);return this.quotaOptions.find((function(e){return e.id===t}))||{id:t,label:t}}return"default"===this.user.quota.quota?this.quotaOptions[0]:this.quotaOptions[1]},minPasswordLength:function(){return this.$store.getters.getPasswordPolicyMinLength},userLanguage:function(){var t=this,e=this.languages[0].languages.concat(this.languages[1].languages).find((function(e){return e.code===t.user.language}));return"object"!==tt(e)&&""!==this.user.language?{code:this.user.language,name:this.user.language}:""!==this.user.language&&e},userLastLoginTooltip:function(){return this.user.lastLogin>0?OC.Util.formatDate(this.user.lastLogin):""},userLastLogin:function(){return this.user.lastLogin>0?OC.Util.relativeModifiedDate(this.user.lastLogin):t("settings","Never")}},methods:{generateAvatar:function(t,e){return e?(0,y.generateUrl)("/avatar/{user}/64/dark?v={version}",{user:t,version:oc_userconfig.avatar.version}):(0,y.generateUrl)("/avatar/{user}/64?v={version}",{user:t,version:oc_userconfig.avatar.version})}}},st={name:"UserRowSimple",components:{NcPopoverMenu:V(),NcActionButton:S(),NcActions:K()},directives:{ClickOutside:Z()},mixins:[et],props:{user:{type:Object,required:!0},loading:{type:Object,required:!0},showConfig:{type:Object,required:!0},userActions:{type:Array,required:!0},openedMenu:{type:Boolean,required:!0},feedbackMessage:{type:String,required:!0},subAdminsGroups:{type:Array,required:!0},settings:{type:Object,required:!0},isDarkTheme:{type:Boolean,required:!0}},computed:{userGroupsLabels:function(){return this.userGroups.map((function(t){return t.name})).join(", ")},userSubAdminsGroupsLabels:function(){return this.userSubAdminsGroups.map((function(t){return t.name})).join(", ")},usedSpace:function(){return this.user.quota.used?t("settings","{size} used",{size:OC.Util.humanFileSize(this.user.quota.used)}):t("settings","{size} used",{size:OC.Util.humanFileSize(0)})},canEdit:function(){return(0,X.ts)().uid!==this.user.id||this.settings.isAdmin},userQuota:function(){var e=this.user.quota.quota;return"default"===e&&"none"!==(e=this.settings.defaultQuota)&&(e=OC.Util.computerFileSize(e)),"none"===e||-3===e?t("settings","Unlimited"):e>=0?OC.Util.humanFileSize(e):OC.Util.humanFileSize(0)}},methods:{toggleMenu:function(){this.$emit("update:openedMenu",!this.openedMenu)},hideMenu:function(){this.$emit("update:openedMenu",!1)},toggleEdit:function(){this.$emit("update:editing",!0)}}},nt=n(93379),it=n.n(nt),at=n(7795),rt=n.n(at),ot=n(90569),ut=n.n(ot),lt=n(3565),dt=n.n(lt),ct=n(19216),gt=n.n(ct),pt=n(44589),ht=n.n(pt),mt=n(78836),ft={};ft.styleTagTransform=ht(),ft.setAttributes=dt(),ft.insert=ut().bind(null,"head"),ft.domAPI=rt(),ft.insertStyleElement=gt(),it()(mt.Z,ft),mt.Z&&mt.Z.locals&&mt.Z.locals;var vt=(0,D.Z)(st,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"row",class:{disabled:t.loading.delete||t.loading.disable},attrs:{"data-id":t.user.id}},[e("div",{staticClass:"avatar",class:{"icon-loading-small":t.loading.delete||t.loading.disable||t.loading.wipe}},[t.loading.delete||t.loading.disable||t.loading.wipe?t._e():e("img",{attrs:{alt:"",width:"32",height:"32",src:t.generateAvatar(t.user.id,t.isDarkTheme)}})]),t._v(" "),e("div",{staticClass:"name"},[e("div",{staticClass:"displayName subtitle"},[e("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.user.displayname.length>20?t.user.displayname:"",expression:"user.displayname.length > 20 ? user.displayname : ''"}],staticClass:"cellText"},[e("strong",[t._v("\n\t\t\t\t\t"+t._s(t.user.displayname)+"\n\t\t\t\t")])])]),t._v("\n\t\t"+t._s(t.user.id)+"\n\t")]),t._v(" "),e("div"),t._v(" "),e("div",{staticClass:"mailAddress"},[e("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:null!==t.user.email&&t.user.email.length>20?t.user.email:"",expression:"user.email !== null && user.email.length > 20 ? user.email : ''"}],staticClass:"cellText"},[t._v("\n\t\t\t"+t._s(t.user.email)+"\n\t\t")])]),t._v(" "),e("div",{staticClass:"groups"},[t._v("\n\t\t"+t._s(t.userGroupsLabels)+"\n\t")]),t._v(" "),t.subAdminsGroups.length>0&&t.settings.isAdmin?e("div",{staticClass:"subAdminsGroups"},[t._v("\n\t\t"+t._s(t.userSubAdminsGroupsLabels)+"\n\t")]):t._e(),t._v(" "),e("div",{staticClass:"userQuota"},[e("div",{staticClass:"quota"},[t._v("\n\t\t\t"+t._s(t.userQuota)+" ("+t._s(t.usedSpace)+")\n\t\t\t"),e("progress",{staticClass:"quota-user-progress",class:{warn:t.usedQuota>80},attrs:{max:"100"},domProps:{value:t.usedQuota}})])]),t._v(" "),t.showConfig.showLanguages?e("div",{staticClass:"languages"},[t._v("\n\t\t"+t._s(t.userLanguage.name)+"\n\t")]):t._e(),t._v(" "),t.showConfig.showUserBackend||t.showConfig.showStoragePath?e("div",{staticClass:"userBackend"},[t.showConfig.showUserBackend?e("div",{staticClass:"userBackend"},[t._v("\n\t\t\t"+t._s(t.user.backend)+"\n\t\t")]):t._e(),t._v(" "),t.showConfig.showStoragePath?e("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.user.storageLocation,expression:"user.storageLocation"}],staticClass:"storageLocation subtitle"},[t._v("\n\t\t\t"+t._s(t.user.storageLocation)+"\n\t\t")]):t._e()]):t._e(),t._v(" "),t.showConfig.showLastLogin?e("div",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.userLastLoginTooltip,expression:"userLastLoginTooltip",modifiers:{auto:!0}}],staticClass:"lastLogin"},[t._v("\n\t\t"+t._s(t.userLastLogin)+"\n\t")]):t._e(),t._v(" "),e("div",{staticClass:"userActions"},[t.canEdit&&!t.loading.all?e("div",{staticClass:"toggleUserActions"},[e("NcActions",[e("NcActionButton",{attrs:{icon:"icon-rename"},on:{click:t.toggleEdit}},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Edit User"))+"\n\t\t\t\t")])],1),t._v(" "),e("div",{staticClass:"userPopoverMenuWrapper"},[e("button",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.hideMenu,expression:"hideMenu"}],staticClass:"icon-more",attrs:{"aria-label":t.t("settings","Toggle user actions menu")},on:{click:function(e){return e.preventDefault(),t.toggleMenu.apply(null,arguments)}}}),t._v(" "),e("div",{staticClass:"popovermenu",class:{open:t.openedMenu},attrs:{"aria-expanded":t.openedMenu}},[e("NcPopoverMenu",{attrs:{menu:t.userActions}})],1)])],1):t._e(),t._v(" "),e("div",{staticClass:"feedback",style:{opacity:""!==t.feedbackMessage?1:0}},[e("div",{staticClass:"icon-checkmark"}),t._v("\n\t\t\t"+t._s(t.feedbackMessage)+"\n\t\t")])])])}),[],!1,null,null,null),wt=vt.exports;function bt(t,e,s,n,i,a,r){try{var o=t[a](r),u=o.value}catch(t){return void s(t)}o.done?e(u):Promise.resolve(u).then(n,i)}function At(t){return function(){var e=this,s=arguments;return new Promise((function(n,i){var a=t.apply(e,s);function r(t){bt(a,n,i,r,o,"next",t)}function o(t){bt(a,n,i,r,o,"throw",t)}r(void 0)}))}}U.ZP.use(W.default);var yt={name:"UserRow",components:{UserRowSimple:wt,NcPopoverMenu:H.Rs,NcActions:H.O3,NcActionButton:H.Js,NcMultiselect:H.Z2},directives:{ClickOutside:Z()},mixins:[et],props:{user:{type:Object,required:!0},settings:{type:Object,default:function(){return{}}},groups:{type:Array,default:function(){return[]}},subAdminsGroups:{type:Array,default:function(){return[]}},quotaOptions:{type:Array,default:function(){return[]}},showConfig:{type:Object,default:function(){return{}}},languages:{type:Array,required:!0},externalActions:{type:Array,default:function(){return[]}},isDarkTheme:{type:Boolean,required:!0}},data:function(){return{rand:parseInt(1e3*Math.random()),openedMenu:!1,feedbackMessage:"",editing:!1,loading:{all:!1,displayName:!1,password:!1,mailAddress:!1,groups:!1,subadmins:!1,quota:!1,delete:!1,disable:!1,languages:!1,wipe:!1}}},computed:{userActions:function(){var e=[{icon:"icon-delete",text:t("settings","Delete user"),action:this.deleteUser},{icon:"icon-delete",text:t("settings","Wipe all devices"),action:this.wipeUserDevices},{icon:this.user.enabled?"icon-close":"icon-add",text:this.user.enabled?t("settings","Disable user"):t("settings","Enable user"),action:this.enableDisableUser}];return null!==this.user.email&&""!==this.user.email&&e.push({icon:"icon-mail",text:t("settings","Resend welcome email"),action:this.sendWelcomeMail}),e.concat(this.externalActions)}},methods:{toggleMenu:function(){this.openedMenu=!this.openedMenu},hideMenu:function(){this.openedMenu=!1},wipeUserDevices:function(){var e=this,s=this.user.id;OC.dialogs.confirmDestructive(t("settings","In case of lost device or exiting the organization, this can remotely wipe the Nextcloud data from all devices associated with {userid}. Only works if the devices are connected to the internet.",{userid:s}),t("settings","Remote wipe of devices"),{type:OC.dialogs.YES_NO_BUTTONS,confirm:t("settings","Wipe {userid}'s devices",{userid:s}),confirmClasses:"error",cancel:t("settings","Cancel")},(function(t){t&&(e.loading.wipe=!0,e.loading.all=!0,e.$store.dispatch("wipeUserDevices",s).then((function(){e.loading.wipe=!1,e.loading.all=!1})))}),!0)},deleteUser:function(){var e=this,s=this.user.id;OC.dialogs.confirmDestructive(t("settings","Fully delete {userid}'s account including all their personal files, app data, etc.",{userid:s}),t("settings","Account deletion"),{type:OC.dialogs.YES_NO_BUTTONS,confirm:t("settings","Delete {userid}'s account",{userid:s}),confirmClasses:"error",cancel:t("settings","Cancel")},(function(t){if(t)return e.loading.delete=!0,e.loading.all=!0,e.$store.dispatch("deleteUser",s).then((function(){e.loading.delete=!1,e.loading.all=!1}))}),!0)},enableDisableUser:function(){var t=this;this.loading.delete=!0,this.loading.all=!0;var e=this.user.id,s=!this.user.enabled;return this.$store.dispatch("enableDisableUser",{userid:e,enabled:s}).then((function(){t.loading.delete=!1,t.loading.all=!1}))},updateDisplayName:function(){var t=this,e=this.$refs.displayName.value;this.loading.displayName=!0,this.$store.dispatch("setUserData",{userid:this.user.id,key:"displayname",value:e}).then((function(){t.loading.displayName=!1,t.$refs.displayName.value=e}))},updatePassword:function(){var t=this,e=this.$refs.password.value;this.loading.password=!0,this.$store.dispatch("setUserData",{userid:this.user.id,key:"password",value:e}).then((function(){t.loading.password=!1,t.$refs.password.value=""}))},updateEmail:function(){var t=this,e=this.$refs.mailAddress.value;this.loading.mailAddress=!0,this.$store.dispatch("setUserData",{userid:this.user.id,key:"email",value:e}).then((function(){t.loading.mailAddress=!1,t.$refs.mailAddress.value=e}))},createGroup:function(t){var e=this;return At(regeneratorRuntime.mark((function s(){var n;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return e.loading={groups:!0,subadmins:!0},s.prev=1,s.next=4,e.$store.dispatch("addGroup",t);case 4:return n=e.user.id,s.next=7,e.$store.dispatch("addUserGroup",{userid:n,gid:t});case 7:s.next=12;break;case 9:s.prev=9,s.t0=s.catch(1),console.error(s.t0);case 12:return s.prev=12,e.loading={groups:!1,subadmins:!1},s.finish(12);case 15:return s.abrupt("return",e.$store.getters.getGroups[e.groups.length]);case 16:case"end":return s.stop()}}),s,null,[[1,9,12,15]])})))()},addUserGroup:function(t){var e=this;return At(regeneratorRuntime.mark((function s(){var n,i;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(!1!==t.canAdd){s.next=2;break}return s.abrupt("return",!1);case 2:return e.loading.groups=!0,n=e.user.id,i=t.id,s.prev=5,s.next=8,e.$store.dispatch("addUserGroup",{userid:n,gid:i});case 8:s.next=13;break;case 10:s.prev=10,s.t0=s.catch(5),console.error(s.t0);case 13:return s.prev=13,e.loading.groups=!1,s.finish(13);case 16:case"end":return s.stop()}}),s,null,[[5,10,13,16]])})))()},removeUserGroup:function(t){var e=this;return At(regeneratorRuntime.mark((function s(){var n,i;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(!1!==t.canRemove){s.next=2;break}return s.abrupt("return",!1);case 2:return e.loading.groups=!0,n=e.user.id,i=t.id,s.prev=5,s.next=8,e.$store.dispatch("removeUserGroup",{userid:n,gid:i});case 8:e.loading.groups=!1,e.$route.params.selectedGroup===i&&e.$store.commit("deleteUser",n),s.next=15;break;case 12:s.prev=12,s.t0=s.catch(5),e.loading.groups=!1;case 15:case"end":return s.stop()}}),s,null,[[5,12]])})))()},addUserSubAdmin:function(t){var e=this;return At(regeneratorRuntime.mark((function s(){var n,i;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return e.loading.subadmins=!0,n=e.user.id,i=t.id,s.prev=3,s.next=6,e.$store.dispatch("addUserSubAdmin",{userid:n,gid:i});case 6:e.loading.subadmins=!1,s.next=12;break;case 9:s.prev=9,s.t0=s.catch(3),console.error(s.t0);case 12:case"end":return s.stop()}}),s,null,[[3,9]])})))()},removeUserSubAdmin:function(t){var e=this;return At(regeneratorRuntime.mark((function s(){var n,i;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return e.loading.subadmins=!0,n=e.user.id,i=t.id,s.prev=3,s.next=6,e.$store.dispatch("removeUserSubAdmin",{userid:n,gid:i});case 6:s.next=11;break;case 8:s.prev=8,s.t0=s.catch(3),console.error(s.t0);case 11:return s.prev=11,e.loading.subadmins=!1,s.finish(11);case 14:case"end":return s.stop()}}),s,null,[[3,8,11,14]])})))()},setUserQuota:function(){var t=arguments,e=this;return At(regeneratorRuntime.mark((function s(){var n;return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return n=t.length>0&&void 0!==t[0]?t[0]:"none",e.loading.quota=!0,n=n.id?n.id:n,s.prev=3,s.next=6,e.$store.dispatch("setUserData",{userid:e.user.id,key:"quota",value:n});case 6:s.next=11;break;case 8:s.prev=8,s.t0=s.catch(3),console.error(s.t0);case 11:return s.prev=11,e.loading.quota=!1,s.finish(11);case 14:return s.abrupt("return",n);case 15:case"end":return s.stop()}}),s,null,[[3,8,11,14]])})))()},validateQuota:function(t){var e=OC.Util.computerFileSize(t);return null!==e&&e>=0&&this.setUserQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(t)))},setUserLanguage:function(t){var e=this;return At(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return e.loading.languages=!0,s.prev=1,s.next=4,e.$store.dispatch("setUserData",{userid:e.user.id,key:"language",value:t.code});case 4:s.next=9;break;case 6:s.prev=6,s.t0=s.catch(1),console.error(s.t0);case 9:return s.prev=9,e.loading.languages=!1,s.finish(9);case 12:return s.abrupt("return",t);case 13:case"end":return s.stop()}}),s,null,[[1,6,9,12]])})))()},sendWelcomeMail:function(){var e=this;this.loading.all=!0,this.$store.dispatch("sendWelcomeMail",this.user.id).then((function(s){s&&(e.feedbackMessage=t("setting","Welcome mail sent!"),setTimeout((function(){e.feedbackMessage=""}),2e3)),e.loading.all=!1}))}}},Ct=yt,_t=n(71838),Ut={};Ut.styleTagTransform=ht(),Ut.setAttributes=dt(),Ut.insert=ut().bind(null,"head"),Ut.domAPI=rt(),Ut.insertStyleElement=gt(),it()(_t.Z,Ut),_t.Z&&_t.Z.locals&&_t.Z.locals;var kt=(0,D.Z)(Ct,(function(){var t=this,e=t._self._c;return 1===Object.keys(t.user).length?e("div",{staticClass:"row",attrs:{"data-id":t.user.id}},[e("div",{staticClass:"avatar",class:{"icon-loading-small":t.loading.delete||t.loading.disable||t.loading.wipe}},[t.loading.delete||t.loading.disable||t.loading.wipe?t._e():e("img",{attrs:{src:t.generateAvatar(t.user.id,t.isDarkTheme),alt:"",height:"32",width:"32"}})]),t._v(" "),e("div",{staticClass:"name"},[t._v("\n\t\t"+t._s(t.user.id)+"\n\t")]),t._v(" "),e("div",{staticClass:"obfuscated"},[t._v("\n\t\t"+t._s(t.t("settings","You do not have permissions to see the details of this user"))+"\n\t")])]):t.editing?e("div",{staticClass:"row row--editable",class:{disabled:t.loading.delete||t.loading.disable,"row--menu-opened":t.openedMenu},attrs:{"data-id":t.user.id}},[e("div",{staticClass:"avatar",class:{"icon-loading-small":t.loading.delete||t.loading.disable||t.loading.wipe}},[t.loading.delete||t.loading.disable||t.loading.wipe?t._e():e("img",{attrs:{src:t.generateAvatar(t.user.id,t.isDarkTheme),alt:"",height:"32",width:"32"}})]),t._v(" "),t.user.backendCapabilities.setDisplayName?e("div",{staticClass:"displayName"},[e("form",{staticClass:"displayName",class:{"icon-loading-small":t.loading.displayName},on:{submit:function(e){return e.preventDefault(),t.updateDisplayName.apply(null,arguments)}}},[e("input",{ref:"displayName",attrs:{id:"displayName"+t.user.id+t.rand,disabled:t.loading.displayName||t.loading.all,autocapitalize:"off",autocomplete:"off",autocorrect:"off",spellcheck:"false",type:"text"},domProps:{value:t.user.displayname}}),t._v(" "),e("input",{staticClass:"icon-confirm",attrs:{type:"submit",value:""}})])]):e("div",{staticClass:"name"},[t._v("\n\t\t"+t._s(t.user.id)+"\n\t\t"),e("div",{staticClass:"displayName subtitle"},[e("div",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.user.displayname.length>20?t.user.displayname:"",expression:"user.displayname.length > 20 ? user.displayname : ''"}],staticClass:"cellText"},[t._v("\n\t\t\t\t"+t._s(t.user.displayname)+"\n\t\t\t")])])]),t._v(" "),t.settings.canChangePassword&&t.user.backendCapabilities.setPassword?e("form",{staticClass:"password",class:{"icon-loading-small":t.loading.password},on:{submit:function(e){return e.preventDefault(),t.updatePassword.apply(null,arguments)}}},[e("input",{ref:"password",attrs:{id:"password"+t.user.id+t.rand,disabled:t.loading.password||t.loading.all,minlength:t.minPasswordLength,maxlength:"469",placeholder:t.t("settings","Add new password"),autocapitalize:"off",autocomplete:"new-password",autocorrect:"off",required:"",spellcheck:"false",type:"password",value:""}}),t._v(" "),e("input",{staticClass:"icon-confirm",attrs:{type:"submit",value:""}})]):e("div"),t._v(" "),e("form",{staticClass:"mailAddress",class:{"icon-loading-small":t.loading.mailAddress},on:{submit:function(e){return e.preventDefault(),t.updateEmail.apply(null,arguments)}}},[e("input",{ref:"mailAddress",attrs:{id:"mailAddress"+t.user.id+t.rand,disabled:t.loading.mailAddress||t.loading.all,placeholder:t.t("settings","Add new email address"),autocapitalize:"off",autocomplete:"new-password",autocorrect:"off",spellcheck:"false",type:"email"},domProps:{value:t.user.email}}),t._v(" "),e("input",{staticClass:"icon-confirm",attrs:{type:"submit",value:""}})]),t._v(" "),e("div",{staticClass:"groups",class:{"icon-loading-small":t.loading.groups}},[e("NcMultiselect",{staticClass:"multiselect-vue",attrs:{"close-on-select":!1,disabled:t.loading.groups||t.loading.all,limit:2,multiple:!0,options:t.availableGroups,placeholder:t.t("settings","Add user to group"),"tag-width":60,taggable:t.settings.isAdmin,value:t.userGroups,label:"name","tag-placeholder":"create","track-by":"id"},on:{remove:t.removeUserGroup,select:t.addUserGroup,tag:t.createGroup}},[e("span",{attrs:{slot:"noResult"},slot:"noResult"},[t._v(t._s(t.t("settings","No results")))])])],1),t._v(" "),t.subAdminsGroups.length>0&&t.settings.isAdmin?e("div",{staticClass:"subadmins",class:{"icon-loading-small":t.loading.subadmins}},[e("NcMultiselect",{staticClass:"multiselect-vue",attrs:{"close-on-select":!1,disabled:t.loading.subadmins||t.loading.all,limit:2,multiple:!0,options:t.subAdminsGroups,placeholder:t.t("settings","Set user as admin for"),"tag-width":60,value:t.userSubAdminsGroups,label:"name","track-by":"id"},on:{remove:t.removeUserSubAdmin,select:t.addUserSubAdmin}},[e("span",{attrs:{slot:"noResult"},slot:"noResult"},[t._v(t._s(t.t("settings","No results")))])])],1):t._e(),t._v(" "),e("div",{directives:[{name:"tooltip",rawName:"v-tooltip.auto",value:t.usedSpace,expression:"usedSpace",modifiers:{auto:!0}}],staticClass:"quota",class:{"icon-loading-small":t.loading.quota}},[e("NcMultiselect",{staticClass:"multiselect-vue",attrs:{"allow-empty":!1,disabled:t.loading.quota||t.loading.all,options:t.quotaOptions,placeholder:t.t("settings","Select user quota"),taggable:!0,value:t.userQuota,label:"label","tag-placeholder":"create","track-by":"id"},on:{input:t.setUserQuota,tag:t.validateQuota}})],1),t._v(" "),t.showConfig.showLanguages?e("div",{staticClass:"languages",class:{"icon-loading-small":t.loading.languages}},[e("NcMultiselect",{staticClass:"multiselect-vue",attrs:{"allow-empty":!1,disabled:t.loading.languages||t.loading.all,options:t.languages,placeholder:t.t("settings","No language set"),value:t.userLanguage,"group-label":"label","group-values":"languages",label:"name","track-by":"code"},on:{input:t.setUserLanguage}})],1):t._e(),t._v(" "),t.showConfig.showStoragePath||t.showConfig.showUserBackend?e("div",{staticClass:"storageLocation"}):t._e(),t._v(" "),t.showConfig.showLastLogin?e("div"):t._e(),t._v(" "),e("div",{staticClass:"userActions"},[t.loading.all?t._e():e("div",{staticClass:"toggleUserActions"},[e("NcActions",[e("NcActionButton",{attrs:{icon:"icon-checkmark"},on:{click:function(e){t.editing=!1}}},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Done"))+"\n\t\t\t\t")])],1),t._v(" "),e("div",{directives:[{name:"click-outside",rawName:"v-click-outside",value:t.hideMenu,expression:"hideMenu"}],staticClass:"userPopoverMenuWrapper"},[e("button",{staticClass:"icon-more",on:{click:function(e){return e.preventDefault(),t.toggleMenu.apply(null,arguments)}}}),t._v(" "),e("div",{staticClass:"popovermenu",class:{open:t.openedMenu}},[e("NcPopoverMenu",{attrs:{menu:t.userActions}})],1)])],1),t._v(" "),e("div",{staticClass:"feedback",style:{opacity:""!==t.feedbackMessage?1:0}},[e("div",{staticClass:"icon-checkmark"}),t._v("\n\t\t\t"+t._s(t.feedbackMessage)+"\n\t\t")])])]):e("UserRowSimple",{class:{"row--menu-opened":t.openedMenu},attrs:{editing:t.editing,"feedback-message":t.feedbackMessage,groups:t.groups,languages:t.languages,loading:t.loading,"opened-menu":t.openedMenu,settings:t.settings,"show-config":t.showConfig,"sub-admins-groups":t.subAdminsGroups,"user-actions":t.userActions,user:t.user,"is-dark-theme":t.isDarkTheme},on:{"update:editing":function(e){t.editing=e},"update:openedMenu":function(e){t.openedMenu=e},"update:opened-menu":function(e){t.openedMenu=e}}})}),[],!1,null,"573e6411",null),Nt=kt.exports,Lt={id:"none",label:t("settings","Unlimited")},xt={id:"default",label:t("settings","Default quota")},Gt={id:"",displayName:"",password:"",mailAddress:"",groups:[],subAdminsGroups:[],quota:xt,language:{code:"en",name:t("settings","Default language")}},St={name:"UserList",components:{NcModal:T(),userRow:Nt,NcMultiselect:_(),InfiniteLoading:z(),NcButton:j()},props:{users:{type:Array,default:function(){return[]}},showConfig:{type:Object,required:!0},selectedGroup:{type:String,default:null},externalActions:{type:Array,default:function(){return[]}}},data:function(){return{unlimitedQuota:Lt,defaultQuota:xt,loading:{all:!1,groups:!1},scrolled:!1,searchQuery:"",newUser:Object.assign({},Gt)}},computed:{settings:function(){return this.$store.getters.getServerData},selectedGroupDecoded:function(){return decodeURIComponent(this.selectedGroup)},filteredUsers:function(){return"disabled"===this.selectedGroup?this.users.filter((function(t){return!1===t.enabled})):(this.settings.isAdmin,this.users.filter((function(t){return!1!==t.enabled})))},groups:function(){return this.$store.getters.getGroups.filter((function(t){return"disabled"!==t.id})).sort((function(t,e){return t.name.localeCompare(e.name)}))},canAddGroups:function(){return this.groups.map((function(t){return(t=Object.assign({},t)).$isDisabled=!1===t.canAdd,t}))},subAdminsGroups:function(){return this.$store.getters.getSubadminGroups},quotaOptions:function(){var t=this.settings.quotaPreset.reduce((function(t,e){return t.concat({id:e,label:e})}),[]);return this.settings.allowUnlimitedQuota&&t.unshift(this.unlimitedQuota),t.unshift(this.defaultQuota),t},minPasswordLength:function(){return this.$store.getters.getPasswordPolicyMinLength},usersOffset:function(){return this.$store.getters.getUsersOffset},usersLimit:function(){return this.$store.getters.getUsersLimit},usersCount:function(){return this.users.length},languages:function(){return[{label:t("settings","Common languages"),languages:this.settings.languages.commonLanguages},{label:t("settings","Other languages"),languages:this.settings.languages.otherLanguages}]},isDarkTheme:function(){return"invert(100%)"===window.getComputedStyle(this.$el).getPropertyValue("--background-invert-if-dark")}},watch:{selectedGroup:function(t,e){this.redirectIfDisabled(),this.$store.commit("resetUsers"),this.$refs.infiniteLoading.stateChanger.reset(),this.setNewUserDefaultGroup(t)},usersCount:function(t,e){0===t&&1===e?this.$refs.infiniteLoading.stateChanger.reset():1===t&&0===e&&this.$refs.infiniteLoading.stateChanger.loaded()}},mounted:function(){this.settings.canChangePassword||OC.Notification.showTemporary(t("settings","Password change is disabled because the master key is disabled")),this.resetForm(),(0,R.Ld)("nextcloud:unified-search.search",this.search),(0,R.Ld)("nextcloud:unified-search.reset",this.resetSearch),this.redirectIfDisabled()},beforeDestroy:function(){(0,R.r1)("nextcloud:unified-search.search",this.search),(0,R.r1)("nextcloud:unified-search.reset",this.resetSearch)},methods:{onScroll:function(t){this.scrolled=t.target.scrollTo>0},validateQuota:function(t){var e=OC.Util.computerFileSize(t);return null!==e&&e>=0?(t=OC.Util.humanFileSize(OC.Util.computerFileSize(t)),this.newUser.quota={id:t,label:t},this.newUser.quota):(this.newUser.quota=this.quotaOptions[0],this.quotaOptions[0])},infiniteHandler:function(t){var e=this;this.$store.dispatch("getUsers",{offset:this.usersOffset,limit:this.usersLimit,group:"disabled"!==this.selectedGroup?this.selectedGroup:"",search:this.searchQuery}).then((function(s){s>0&&t.loaded(),s<e.usersLimit&&t.complete()}))},search:function(t){var e=t.query;this.searchQuery=e,this.$store.commit("resetUsers"),this.$refs.infiniteLoading.stateChanger.reset()},resetSearch:function(){this.search({query:""})},resetForm:function(){this.newUser=Object.assign({},Gt),this.settings.defaultLanguage&&U.ZP.set(this.newUser.language,"code",this.settings.defaultLanguage),this.setNewUserDefaultGroup(this.selectedGroup),this.loading.all=!1},createUser:function(){var t=this;this.loading.all=!0,this.$store.dispatch("addUser",{userid:this.newUser.id,password:this.newUser.password,displayName:this.newUser.displayName,email:this.newUser.mailAddress,groups:this.newUser.groups.map((function(t){return t.id})),subadmin:this.newUser.subAdminsGroups.map((function(t){return t.id})),quota:this.newUser.quota.id,language:this.newUser.language.code}).then((function(){t.resetForm(),t.$refs.newusername.focus(),t.closeModal()})).catch((function(e){if(t.loading.all=!1,e.response&&e.response.data&&e.response.data.ocs&&e.response.data.ocs.meta){var s=e.response.data.ocs.meta.statuscode;102===s?t.$refs.newusername.focus():107===s&&t.$refs.newuserpassword.focus()}}))},setNewUserDefaultGroup:function(t){if(t&&t.length>0){var e=this.groups.find((function(e){return e.id===t}));if(e)return void(this.newUser.groups=[e])}this.newUser.groups=[]},createGroup:function(t){var e=this;return this.loading.groups=!0,this.$store.dispatch("addGroup",t).then((function(s){e.newUser.groups.push(e.groups.find((function(e){return e.id===t}))),e.loading.groups=!1})).catch((function(){e.loading.groups=!1})),this.$store.getters.getGroups[this.groups.length]},redirectIfDisabled:function(){var t=this.$store.getters.getGroups;"disabled"===this.selectedGroup&&t.findIndex((function(t){return"disabled"===t.id&&0===t.usercount}))>-1&&(this.$router.push({name:"users"}),this.$refs.infiniteLoading.stateChanger.reset())},closeModal:function(){this.showConfig.showNewUserForm=!1}}},Mt=n(47407),qt={};qt.styleTagTransform=ht(),qt.setAttributes=dt(),qt.insert=ut().bind(null,"head"),qt.domAPI=rt(),qt.insertStyleElement=gt(),it()(Mt.Z,qt),Mt.Z&&Mt.Z.locals&&Mt.Z.locals;var $t=(0,D.Z)(St,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"user-list-grid",attrs:{id:"app-content"},on:{"&scroll":function(e){return t.onScroll.apply(null,arguments)}}},[t.showConfig.showNewUserForm?e("NcModal",{attrs:{size:"small"},on:{close:t.closeModal}},[e("form",{staticClass:"modal__content",attrs:{id:"new-user",disabled:t.loading.all},on:{submit:function(e){return e.preventDefault(),t.createUser.apply(null,arguments)}}},[e("h2",[t._v(t._s(t.t("settings","New user")))]),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.newUser.id,expression:"newUser.id"}],ref:"newusername",staticClass:"modal__item",attrs:{id:"newusername",disabled:t.settings.newUserGenerateUserID,placeholder:t.settings.newUserGenerateUserID?t.t("settings","Will be autogenerated"):t.t("settings","Username"),autocapitalize:"none",autocomplete:"off",autocorrect:"off",name:"username",pattern:"[a-zA-Z0-9 _\\.@\\-']+",required:"",type:"text"},domProps:{value:t.newUser.id},on:{input:function(e){e.target.composing||t.$set(t.newUser,"id",e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.newUser.displayName,expression:"newUser.displayName"}],staticClass:"modal__item",attrs:{id:"newdisplayname",placeholder:t.t("settings","Display name"),autocapitalize:"none",autocomplete:"off",autocorrect:"off",name:"displayname",type:"text"},domProps:{value:t.newUser.displayName},on:{input:function(e){e.target.composing||t.$set(t.newUser,"displayName",e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.newUser.password,expression:"newUser.password"}],ref:"newuserpassword",staticClass:"modal__item",attrs:{id:"newuserpassword",minlength:t.minPasswordLength,maxlength:469,placeholder:t.t("settings","Password"),required:""===t.newUser.mailAddress,autocapitalize:"none",autocomplete:"new-password",autocorrect:"off",name:"password",type:"password"},domProps:{value:t.newUser.password},on:{input:function(e){e.target.composing||t.$set(t.newUser,"password",e.target.value)}}}),t._v(" "),e("input",{directives:[{name:"model",rawName:"v-model",value:t.newUser.mailAddress,expression:"newUser.mailAddress"}],staticClass:"modal__item",attrs:{id:"newemail",placeholder:t.t("settings","Email"),required:""===t.newUser.password||t.settings.newUserRequireEmail,autocapitalize:"none",autocomplete:"off",autocorrect:"off",name:"email",type:"email"},domProps:{value:t.newUser.mailAddress},on:{input:function(e){e.target.composing||t.$set(t.newUser,"mailAddress",e.target.value)}}}),t._v(" "),e("div",{staticClass:"groups modal__item"},[t.settings.isAdmin?t._e():e("input",{class:{"icon-loading-small":t.loading.groups},attrs:{id:"newgroups",required:!t.settings.isAdmin,tabindex:"-1",type:"text"},domProps:{value:t.newUser.groups}}),t._v(" "),e("NcMultiselect",{staticClass:"multiselect-vue",attrs:{"close-on-select":!1,disabled:t.loading.groups||t.loading.all,multiple:!0,options:t.canAddGroups,placeholder:t.t("settings","Add user to group"),"tag-width":60,taggable:!0,label:"name","tag-placeholder":"create","track-by":"id"},on:{tag:t.createGroup},model:{value:t.newUser.groups,callback:function(e){t.$set(t.newUser,"groups",e)},expression:"newUser.groups"}},[e("span",{attrs:{slot:"noResult"},slot:"noResult"},[t._v(t._s(t.t("settings","No results")))])])],1),t._v(" "),t.subAdminsGroups.length>0&&t.settings.isAdmin?e("div",{staticClass:"subadmins modal__item"},[e("NcMultiselect",{staticClass:"multiselect-vue",attrs:{"close-on-select":!1,multiple:!0,options:t.subAdminsGroups,placeholder:t.t("settings","Set user as admin for"),"tag-width":60,label:"name","track-by":"id"},model:{value:t.newUser.subAdminsGroups,callback:function(e){t.$set(t.newUser,"subAdminsGroups",e)},expression:"newUser.subAdminsGroups"}},[e("span",{attrs:{slot:"noResult"},slot:"noResult"},[t._v(t._s(t.t("settings","No results")))])])],1):t._e(),t._v(" "),e("div",{staticClass:"quota modal__item"},[e("NcMultiselect",{staticClass:"multiselect-vue",attrs:{"allow-empty":!1,options:t.quotaOptions,placeholder:t.t("settings","Select user quota"),taggable:!0,label:"label","track-by":"id"},on:{tag:t.validateQuota},model:{value:t.newUser.quota,callback:function(e){t.$set(t.newUser,"quota",e)},expression:"newUser.quota"}})],1),t._v(" "),t.showConfig.showLanguages?e("div",{staticClass:"languages modal__item"},[e("NcMultiselect",{staticClass:"multiselect-vue",attrs:{"allow-empty":!1,options:t.languages,placeholder:t.t("settings","Default language"),"group-label":"label","group-values":"languages",label:"name","track-by":"code"},model:{value:t.newUser.language,callback:function(e){t.$set(t.newUser,"language",e)},expression:"newUser.language"}})],1):t._e(),t._v(" "),t.showConfig.showStoragePath?e("div",{staticClass:"storageLocation"}):t._e(),t._v(" "),t.showConfig.showUserBackend?e("div",{staticClass:"userBackend"}):t._e(),t._v(" "),t.showConfig.showLastLogin?e("div",{staticClass:"lastLogin"}):t._e(),t._v(" "),e("div",{staticClass:"user-actions"},[e("NcButton",{attrs:{id:"newsubmit",type:"primary","native-type":"submit",value:""}},[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Add a new user"))+"\n\t\t\t\t")])],1)])]):t._e(),t._v(" "),e("div",{staticClass:"row",class:{sticky:t.scrolled&&!t.showConfig.showNewUserForm},attrs:{id:"grid-header"}},[e("div",{staticClass:"avatar",attrs:{id:"headerAvatar"}}),t._v(" "),e("div",{staticClass:"name",attrs:{id:"headerName"}},[e("div",{staticClass:"subtitle"},[e("strong",[t._v("\n\t\t\t\t\t"+t._s(t.t("settings","Display name"))+"\n\t\t\t\t")])]),t._v("\n\t\t\t"+t._s(t.t("settings","Username"))+"\n\t\t")]),t._v(" "),e("div",{staticClass:"password",attrs:{id:"headerPassword"}},[t._v("\n\t\t\t"+t._s(t.t("settings","Password"))+"\n\t\t")]),t._v(" "),e("div",{staticClass:"mailAddress",attrs:{id:"headerAddress"}},[t._v("\n\t\t\t"+t._s(t.t("settings","Email"))+"\n\t\t")]),t._v(" "),e("div",{staticClass:"groups",attrs:{id:"headerGroups"}},[t._v("\n\t\t\t"+t._s(t.t("settings","Groups"))+"\n\t\t")]),t._v(" "),t.subAdminsGroups.length>0&&t.settings.isAdmin?e("div",{staticClass:"subadmins",attrs:{id:"headerSubAdmins"}},[t._v("\n\t\t\t"+t._s(t.t("settings","Group admin for"))+"\n\t\t")]):t._e(),t._v(" "),e("div",{staticClass:"quota",attrs:{id:"headerQuota"}},[t._v("\n\t\t\t"+t._s(t.t("settings","Quota"))+"\n\t\t")]),t._v(" "),t.showConfig.showLanguages?e("div",{staticClass:"languages",attrs:{id:"headerLanguages"}},[t._v("\n\t\t\t"+t._s(t.t("settings","Language"))+"\n\t\t")]):t._e(),t._v(" "),t.showConfig.showUserBackend||t.showConfig.showStoragePath?e("div",{staticClass:"headerUserBackend userBackend"},[t.showConfig.showUserBackend?e("div",{staticClass:"userBackend"},[t._v("\n\t\t\t\t"+t._s(t.t("settings","User backend"))+"\n\t\t\t")]):t._e(),t._v(" "),t.showConfig.showStoragePath?e("div",{staticClass:"subtitle storageLocation"},[t._v("\n\t\t\t\t"+t._s(t.t("settings","Storage location"))+"\n\t\t\t")]):t._e()]):t._e(),t._v(" "),t.showConfig.showLastLogin?e("div",{staticClass:"headerLastLogin lastLogin"},[t._v("\n\t\t\t"+t._s(t.t("settings","Last login"))+"\n\t\t")]):t._e(),t._v(" "),e("div",{staticClass:"userActions"})]),t._v(" "),t._l(t.filteredUsers,(function(s){return e("user-row",{key:s.id,attrs:{"external-actions":t.externalActions,groups:t.groups,languages:t.languages,"quota-options":t.quotaOptions,settings:t.settings,"show-config":t.showConfig,"sub-admins-groups":t.subAdminsGroups,user:s,"is-dark-theme":t.isDarkTheme}})})),t._v(" "),e("InfiniteLoading",{ref:"infiniteLoading",on:{infinite:t.infiniteHandler}},[e("div",{attrs:{slot:"spinner"},slot:"spinner"},[e("div",{staticClass:"users-icon-loading icon-loading"})]),t._v(" "),e("div",{attrs:{slot:"no-more"},slot:"no-more"},[e("div",{staticClass:"users-list-end"})]),t._v(" "),e("div",{attrs:{slot:"no-results"},slot:"no-results"},[e("div",{attrs:{id:"emptycontent"}},[e("div",{staticClass:"icon-contacts-dark"}),t._v(" "),e("h2",[t._v(t._s(t.t("settings","No users in here")))])])])])],2)}),[],!1,null,"09961579",null),Ot=$t.exports;function Pt(t){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pt(t)}function Dt(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,n)}return s}function Bt(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?Dt(Object(s),!0).forEach((function(e){Rt(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Dt(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}function Rt(t,e,s){return(e=function(t){var e=function(t,e){if("object"!==Pt(t)||null===t)return t;var s=t[Symbol.toPrimitive];if(void 0!==s){var n=s.call(t,e);if("object"!==Pt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Pt(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Qt(t,e,s,n,i,a,r){try{var o=t[a](r),u=o.value}catch(t){return void s(t)}o.done?e(u):Promise.resolve(u).then(n,i)}function zt(t){return function(){var e=this,s=arguments;return new Promise((function(n,i){var a=t.apply(e,s);function r(t){Qt(a,n,i,r,o,"next",t)}function o(t){Qt(a,n,i,r,o,"throw",t)}r(void 0)}))}}U.ZP.use(N());var It={name:"Users",components:{NcAppContent:a(),NcAppNavigation:o(),NcAppNavigationCaption:l(),NcAppNavigationCounter:c(),NcAppNavigationItem:p(),NcAppNavigationNew:m(),NcAppNavigationSettings:v(),NcContent:A(),GroupListItem:B,NcMultiselect:_(),UserList:Ot},props:{selectedGroup:{type:String,default:null}},data:function(){return{unlimitedQuota:{id:"none",label:t("settings","Unlimited")},selectedQuota:!1,externalActions:[],loadingAddGroup:!1,loadingSendMail:!1,showConfig:{showStoragePath:!1,showUserBackend:!1,showLastLogin:!1,showNewUserForm:!1,showLanguages:!1}}},computed:{selectedGroupDecoded:function(){return this.selectedGroup?decodeURIComponent(this.selectedGroup):null},users:function(){return this.$store.getters.getUsers},groups:function(){return this.$store.getters.getGroups},usersOffset:function(){return this.$store.getters.getUsersOffset},usersLimit:function(){return this.$store.getters.getUsersLimit},showLanguages:{get:function(){return this.getLocalstorage("showLanguages")},set:function(t){this.setLocalStorage("showLanguages",t)}},showLastLogin:{get:function(){return this.getLocalstorage("showLastLogin")},set:function(t){this.setLocalStorage("showLastLogin",t)}},showUserBackend:{get:function(){return this.getLocalstorage("showUserBackend")},set:function(t){this.setLocalStorage("showUserBackend",t)}},showStoragePath:{get:function(){return this.getLocalstorage("showStoragePath")},set:function(t){this.setLocalStorage("showStoragePath",t)}},userCount:function(){return this.$store.getters.getUserCount},settings:function(){return this.$store.getters.getServerData},quotaOptions:function(){var t=this.settings.quotaPreset.reduce((function(t,e){return t.concat({id:e,label:e})}),[]);return this.settings.allowUnlimitedQuota&&t.unshift(this.unlimitedQuota),t},defaultQuota:{get:function(){return!1!==this.selectedQuota?this.selectedQuota:this.settings.defaultQuota!==this.unlimitedQuota.id&&OC.Util.computerFileSize(this.settings.defaultQuota)>=0?{id:this.settings.defaultQuota,label:this.settings.defaultQuota}:this.unlimitedQuota},set:function(t){this.selectedQuota=t}},sendWelcomeMail:{get:function(){return this.settings.newUserSendEmail},set:function(t){var e=this;return zt(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.prev=0,e.loadingSendMail=!0,e.$store.commit("setServerData",Bt(Bt({},e.settings),{},{newUserSendEmail:t})),s.next=5,w.default.post((0,y.generateUrl)("/settings/users/preferences/newUser.sendEmail"),{value:t?"yes":"no"});case 5:s.next=10;break;case 7:s.prev=7,s.t0=s.catch(0),console.error("could not update newUser.sendEmail preference: "+s.t0.message,s.t0);case 10:return s.prev=10,e.loadingSendMail=!1,s.finish(10);case 13:case"end":return s.stop()}}),s,null,[[0,7,10,13]])})))()}},groupList:function(){var t=this;return(Array.isArray(this.groups)?this.groups:[]).filter((function(t){return"disabled"!==t.id&&"admin"!==t.id})).map((function(e){return t.formatGroupMenu(e)}))},adminGroupMenu:function(){return this.formatGroupMenu(this.groups.find((function(t){return"admin"===t.id})))},disabledGroupMenu:function(){return this.formatGroupMenu(this.groups.find((function(t){return"disabled"===t.id})))}},beforeMount:function(){this.$store.commit("initGroups",{groups:this.$store.getters.getServerData.groups,orderBy:this.$store.getters.getServerData.sortGroups,userCount:this.$store.getters.getServerData.userCount}),this.$store.dispatch("getPasswordPolicyMinLength")},created:function(){Object.assign(OCA,{Settings:{UserList:{registerAction:this.registerAction}}})},methods:{showNewUserMenu:function(){this.showConfig.showNewUserForm=!0,this.showConfig.showNewUserForm&&U.ZP.nextTick((function(){window.newusername.focus()}))},getLocalstorage:function(t){var e=this.$localStorage.get(t);return this.showConfig[t]=null!==e?"true"===e:this.showConfig[t],this.showConfig[t]},setLocalStorage:function(t,e){return this.showConfig[t]=e,this.$localStorage.set(t,e),e},setDefaultQuota:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"none";this.$store.dispatch("setAppConfig",{app:"files",key:"default_quota",value:e.id?e.id:e}).then((function(){"object"!==Pt(e)&&(e={id:e,label:e}),t.defaultQuota=e}))},validateQuota:function(t){return null===OC.Util.computerFileSize(t)?this.setDefaultQuota("none"):this.setDefaultQuota(OC.Util.humanFileSize(OC.Util.computerFileSize(t)))},registerAction:function(t,e,s){return this.externalActions.push({icon:t,text:e,action:s}),this.externalActions},createGroup:function(t){var e=this;return zt(regeneratorRuntime.mark((function s(){return regeneratorRuntime.wrap((function(s){for(;;)switch(s.prev=s.next){case 0:if(""!==t.trim()){s.next=2;break}return s.abrupt("return");case 2:return s.prev=2,e.loadingAddGroup=!0,s.next=6,e.$store.dispatch("addGroup",t.trim());case 6:return e.hideAddGroupForm(),s.next=9,e.$router.push({name:"group",params:{selectedGroup:encodeURIComponent(t.trim())}});case 9:s.next=14;break;case 11:s.prev=11,s.t0=s.catch(2),e.showAddGroupForm();case 14:return s.prev=14,e.loadingAddGroup=!1,s.finish(14);case 17:case"end":return s.stop()}}),s,null,[[2,11,14,17]])})))()},showAddGroupForm:function(){var t=this;this.$refs.addGroup.editingActive=!0,this.$refs.addGroup.onMenuToggle(!1),this.$nextTick((function(){t.$refs.addGroup.$refs.editingInput.focusInput()}))},hideAddGroupForm:function(){this.$refs.addGroup.editingActive=!1,this.$refs.addGroup.editingValue=""},formatGroupMenu:function(t){var e={};return void 0===t?{}:(e.id=t.id,e.title=t.name,e.usercount=t.usercount,t.usercount-t.disabled>0&&(e.count=t.usercount-t.disabled),e)}}},Tt=It,Ft=n(68430),jt={};jt.styleTagTransform=ht(),jt.setAttributes=dt(),jt.insert=ut().bind(null,"head"),jt.domAPI=rt(),jt.insertStyleElement=gt(),it()(Ft.Z,jt),Ft.Z&&Ft.Z.locals&&Ft.Z.locals;var Et=(0,D.Z)(Tt,(function(){var t=this,e=t._self._c;return e("NcContent",{attrs:{"app-name":"settings","navigation-class":{"icon-loading":t.loadingAddGroup}}},[e("NcAppNavigation",{scopedSlots:t._u([{key:"list",fn:function(){return[e("NcAppNavigationItem",{ref:"addGroup",attrs:{id:"addgroup","edit-placeholder":t.t("settings","Enter group name"),editable:!0,loading:t.loadingAddGroup,title:t.t("settings","Add group"),icon:"icon-add"},on:{click:t.showAddGroupForm,"update:title":t.createGroup}}),t._v(" "),e("NcAppNavigationItem",{attrs:{id:"everyone",exact:!0,title:t.t("settings","Active users"),to:{name:"users"},icon:"icon-contacts-dark"}},[t.userCount>0?e("NcAppNavigationCounter",{attrs:{slot:"counter"},slot:"counter"},[t._v("\n\t\t\t\t\t"+t._s(t.userCount)+"\n\t\t\t\t")]):t._e()],1),t._v(" "),t.settings.isAdmin?e("NcAppNavigationItem",{attrs:{id:"admin",exact:!0,title:t.t("settings","Admins"),to:{name:"group",params:{selectedGroup:"admin"}},icon:"icon-user-admin"}},[t.adminGroupMenu.count?e("NcAppNavigationCounter",{attrs:{slot:"counter"},slot:"counter"},[t._v("\n\t\t\t\t\t"+t._s(t.adminGroupMenu.count)+"\n\t\t\t\t")]):t._e()],1):t._e(),t._v(" "),t.disabledGroupMenu.usercount>0||-1===t.disabledGroupMenu.usercount?e("NcAppNavigationItem",{attrs:{id:"disabled",exact:!0,title:t.t("settings","Disabled users"),to:{name:"group",params:{selectedGroup:"disabled"}},icon:"icon-disabled-users"}},[t.disabledGroupMenu.usercount>0?e("NcAppNavigationCounter",{attrs:{slot:"counter"},slot:"counter"},[t._v("\n\t\t\t\t\t"+t._s(t.disabledGroupMenu.usercount)+"\n\t\t\t\t")]):t._e()],1):t._e(),t._v(" "),t.groupList.length>0?e("NcAppNavigationCaption",{attrs:{title:t.t("settings","Groups")}}):t._e(),t._v(" "),t._l(t.groupList,(function(t){return e("GroupListItem",{key:t.id,attrs:{id:t.id,title:t.title,count:t.count}})}))]},proxy:!0},{key:"footer",fn:function(){return[e("NcAppNavigationSettings",[e("div",[e("p",[t._v(t._s(t.t("settings","Default quota:")))]),t._v(" "),e("NcMultiselect",{attrs:{value:t.defaultQuota,options:t.quotaOptions,"tag-placeholder":"create",placeholder:t.t("settings","Select default quota"),label:"label","track-by":"id","allow-empty":!1,taggable:!0},on:{tag:t.validateQuota,input:t.setDefaultQuota}})],1),t._v(" "),e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.showLanguages,expression:"showLanguages"}],staticClass:"checkbox",attrs:{id:"showLanguages",type:"checkbox"},domProps:{checked:Array.isArray(t.showLanguages)?t._i(t.showLanguages,null)>-1:t.showLanguages},on:{change:function(e){var s=t.showLanguages,n=e.target,i=!!n.checked;if(Array.isArray(s)){var a=t._i(s,null);n.checked?a<0&&(t.showLanguages=s.concat([null])):a>-1&&(t.showLanguages=s.slice(0,a).concat(s.slice(a+1)))}else t.showLanguages=i}}}),t._v(" "),e("label",{attrs:{for:"showLanguages"}},[t._v(t._s(t.t("settings","Show Languages")))])]),t._v(" "),e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.showLastLogin,expression:"showLastLogin"}],staticClass:"checkbox",attrs:{id:"showLastLogin",type:"checkbox"},domProps:{checked:Array.isArray(t.showLastLogin)?t._i(t.showLastLogin,null)>-1:t.showLastLogin},on:{change:function(e){var s=t.showLastLogin,n=e.target,i=!!n.checked;if(Array.isArray(s)){var a=t._i(s,null);n.checked?a<0&&(t.showLastLogin=s.concat([null])):a>-1&&(t.showLastLogin=s.slice(0,a).concat(s.slice(a+1)))}else t.showLastLogin=i}}}),t._v(" "),e("label",{attrs:{for:"showLastLogin"}},[t._v(t._s(t.t("settings","Show last login")))])]),t._v(" "),e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.showUserBackend,expression:"showUserBackend"}],staticClass:"checkbox",attrs:{id:"showUserBackend",type:"checkbox"},domProps:{checked:Array.isArray(t.showUserBackend)?t._i(t.showUserBackend,null)>-1:t.showUserBackend},on:{change:function(e){var s=t.showUserBackend,n=e.target,i=!!n.checked;if(Array.isArray(s)){var a=t._i(s,null);n.checked?a<0&&(t.showUserBackend=s.concat([null])):a>-1&&(t.showUserBackend=s.slice(0,a).concat(s.slice(a+1)))}else t.showUserBackend=i}}}),t._v(" "),e("label",{attrs:{for:"showUserBackend"}},[t._v(t._s(t.t("settings","Show user backend")))])]),t._v(" "),e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.showStoragePath,expression:"showStoragePath"}],staticClass:"checkbox",attrs:{id:"showStoragePath",type:"checkbox"},domProps:{checked:Array.isArray(t.showStoragePath)?t._i(t.showStoragePath,null)>-1:t.showStoragePath},on:{change:function(e){var s=t.showStoragePath,n=e.target,i=!!n.checked;if(Array.isArray(s)){var a=t._i(s,null);n.checked?a<0&&(t.showStoragePath=s.concat([null])):a>-1&&(t.showStoragePath=s.slice(0,a).concat(s.slice(a+1)))}else t.showStoragePath=i}}}),t._v(" "),e("label",{attrs:{for:"showStoragePath"}},[t._v(t._s(t.t("settings","Show storage path")))])]),t._v(" "),e("div",[e("input",{directives:[{name:"model",rawName:"v-model",value:t.sendWelcomeMail,expression:"sendWelcomeMail"}],staticClass:"checkbox",attrs:{id:"sendWelcomeMail",disabled:t.loadingSendMail,type:"checkbox"},domProps:{checked:Array.isArray(t.sendWelcomeMail)?t._i(t.sendWelcomeMail,null)>-1:t.sendWelcomeMail},on:{change:function(e){var s=t.sendWelcomeMail,n=e.target,i=!!n.checked;if(Array.isArray(s)){var a=t._i(s,null);n.checked?a<0&&(t.sendWelcomeMail=s.concat([null])):a>-1&&(t.sendWelcomeMail=s.slice(0,a).concat(s.slice(a+1)))}else t.sendWelcomeMail=i}}}),t._v(" "),e("label",{attrs:{for:"sendWelcomeMail"}},[t._v(t._s(t.t("settings","Send email to new user")))])])])]},proxy:!0}])},[e("NcAppNavigationNew",{attrs:{"button-id":"new-user-button",text:t.t("settings","New user"),"button-class":"icon-add"},on:{click:t.showNewUserMenu,keyup:[function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.showNewUserMenu.apply(null,arguments)},function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"space",32,e.key,[" ","Spacebar"])?null:t.showNewUserMenu.apply(null,arguments)}]}})],1),t._v(" "),e("NcAppContent",[e("UserList",{attrs:{users:t.users,"show-config":t.showConfig,"selected-group":t.selectedGroupDecoded,"external-actions":t.externalActions}})],1)],1)}),[],!1,null,"7004587b",null),Zt=Et.exports}}]);
//# sourceMappingURL=settings-users-8351.js.map?v=6b9e360c7903d202d10c