]> source.dussan.org Git - nextcloud-server.git/commitdiff
chore(assets): Recompile assets 40883/head
authornextcloud-command <nextcloud-command@users.noreply.github.com>
Thu, 12 Oct 2023 11:00:55 +0000 (11:00 +0000)
committernextcloud-command <nextcloud-command@users.noreply.github.com>
Thu, 12 Oct 2023 11:00:55 +0000 (11:00 +0000)
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
dist/settings-vue-settings-apps-users-management.js
dist/settings-vue-settings-apps-users-management.js.map

index e0587c4fbc3d0227e0ee8037ecc6c4b23063edaa..dea1ebcc669bf8abfffa63ad1efb40908a6a8961 100644 (file)
@@ -1,3 +1,3 @@
 /*! For license information please see settings-vue-settings-apps-users-management.js.LICENSE.txt */
-!function(){"use strict";var e,r,o,i={92652:function(e,t,r){r.d(t,{J:function(){return o}});var n=r(31352),o=Object.freeze({enabled:(0,n.Iu)("settings","Active apps"),disabled:(0,n.Iu)("settings","Disabled apps"),updates:(0,n.Iu)("settings","Updates"),"app-bundles":(0,n.Iu)("settings","App bundles"),featured:(0,n.Iu)("settings","Featured apps")})},9685:function(e,r,o){var i=o(20144),u=o(61361),a=o(83678),s={name:"App",beforeMount:function(){null!==document.getElementById("serverData")&&this.$store.commit("setServerData",JSON.parse(document.getElementById("serverData").dataset.server))}},c=(0,o(51900).Z)(s,(function(){return(0,this._self._c)("router-view")}),[],!1,null,null,null).exports,d=o(78345),p=o(79753),f=o(92652),l=o(20629),m=o(4820),g=o(10128),h=(o(65509),function(e){return e.replace(/\/$/,"")}),v=function(){return(0,g.confirmPassword)()},A=function(e,t){return m.default.get(h(e),t)},I=function(e,t){return m.default.post(h(e),t)},b=function(e,t){return m.default.put(h(e),t)},y=function(e,t){return m.default.delete(h(e),{params:t})},U=(0,o(17499).IY)().setApp("settings").detectUser().build(),P=o(25108),L=function(e,t){return 1===t?e.sort((function(e,t){return e.usercount-e.disabled<t.usercount-t.disabled})):e.sort((function(e,t){return e.name.localeCompare(t.name)}))},C={id:"",name:"",usercount:0,disabled:0,canAdd:!0,canRemove:!0},w={appendUsers:function(e,t){var r=e.users.concat(Object.keys(t).map((function(e){return t[e]})));e.usersOffset+=e.usersLimit,e.users=r},setPasswordPolicyMinLength:function(e,t){e.minPasswordLength=""!==t?t:0},initGroups:function(e,t){var r=t.groups,n=t.orderBy,o=t.userCount;e.groups=r.map((function(e){return Object.assign({},C,e)})),e.orderBy=n,e.userCount=o,e.groups=L(e.groups,e.orderBy)},addGroup:function(e,t){var r=t.gid,n=t.displayName;try{if(void 0!==e.groups.find((function(e){return e.id===r})))return;var o=Object.assign({},C,{id:r,name:n});e.groups.push(o),e.groups=L(e.groups,e.orderBy)}catch(e){P.error("Can't create group",e)}},renameGroup:function(e,t){var r=t.gid,n=t.displayName,o=e.groups.findIndex((function(e){return e.id===r}));if(o>=0){var i=e.groups[o];i.name=n,e.groups.splice(o,1,i),e.groups=L(e.groups,e.orderBy)}},removeGroup:function(e,t){var r=e.groups.findIndex((function(e){return e.id===t}));r>=0&&e.groups.splice(r,1)},addUserGroup:function(e,t){var r=t.userid,n=t.gid,o=e.groups.find((function(e){return e.id===n})),i=e.users.find((function(e){return e.id===r}));o&&i.enabled&&e.userCount>0&&o.usercount++,i.groups.push(n),e.groups=L(e.groups,e.orderBy)},removeUserGroup:function(e,t){var r=t.userid,n=t.gid,o=e.groups.find((function(e){return e.id===n})),i=e.users.find((function(e){return e.id===r}));o&&i.enabled&&e.userCount>0&&o.usercount--;var u=i.groups;u.splice(u.indexOf(n),1),e.groups=L(e.groups,e.orderBy)},addUserSubAdmin:function(e,t){var r=t.userid,n=t.gid;e.users.find((function(e){return e.id===r})).subadmin.push(n)},removeUserSubAdmin:function(e,t){var r=t.userid,n=t.gid,o=e.users.find((function(e){return e.id===r})).subadmin;o.splice(o.indexOf(n),1)},deleteUser:function(e,t){var r=e.users.findIndex((function(e){return e.id===t}));this.commit("updateUserCounts",{user:e.users[r],actionType:"remove"}),e.users.splice(r,1)},addUserData:function(e,t){var r=t.data.ocs.data;e.users.push(r),this.commit("updateUserCounts",{user:r,actionType:"create"})},enableDisableUser:function(e,t){var r=t.userid,n=t.enabled,o=e.users.find((function(e){return e.id===r}));o.enabled=n,this.commit("updateUserCounts",{user:o,actionType:n?"enable":"disable"})},updateUserCounts:function(e,t){var r=t.user,n=t.actionType,o=e.groups.find((function(e){return"disabled"===e.id}));switch(n){case"enable":case"disable":o.usercount+=r.enabled?-1:1,e.userCount+=r.enabled?1:-1,r.groups.forEach((function(t){e.groups.find((function(e){return e.id===t})).disabled+=r.enabled?-1:1}));break;case"create":e.userCount++,r.groups.forEach((function(t){e.groups.find((function(e){return e.id===t})).usercount++}));break;case"remove":r.enabled?(e.userCount--,r.groups.forEach((function(t){var r=e.groups.find((function(e){return e.id===t}));r?r.usercount--:P.warn("User group "+t+" does not exist during user removal")}))):(o.usercount--,r.groups.forEach((function(t){e.groups.find((function(e){return e.id===t})).disabled--})));break;default:U.error("Unknown action type in updateUserCounts: '".concat(n,"'"))}},setUserData:function(e,t){var r=t.userid,n=t.key,o=t.value;if("quota"===n){var i=OC.Util.computerFileSize(o);e.users.find((function(e){return e.id===r}))[n][n]=null!==i?i:o}else e.users.find((function(e){return e.id===r}))[n]=o},resetUsers:function(e){e.users=[],e.usersOffset=0}},E=m.default.CancelToken,O=null,_={state:{users:[],groups:[],orderBy:1,minPasswordLength:0,usersOffset:0,usersLimit:25,userCount:0},mutations:w,getters:{getUsers:function(e){return e.users},getGroups:function(e){return e.groups},getSubadminGroups:function(e){return e.groups.filter((function(e){return"admin"!==e.id&&"disabled"!==e.id}))},getPasswordPolicyMinLength:function(e){return e.minPasswordLength},getUsersOffset:function(e){return e.usersOffset},getUsersLimit:function(e){return e.usersLimit},getUserCount:function(e){return e.userCount}},actions:{getUsers:function(e,t){var r=t.offset,n=t.limit,o=t.search,i=t.group;return O&&O.cancel("Operation canceled by another search request."),O=E.source(),o="string"==typeof o?o:"",""!==(i="string"==typeof i?i:"")?A((0,p.generateOcsUrl)("cloud/groups/{group}/users/details?offset={offset}&limit={limit}&search={search}",{group:encodeURIComponent(i),offset:r,limit:n,search:o}),{cancelToken:O.token}).then((function(t){var r=Object.keys(t.data.ocs.data.users).length;return r>0&&e.commit("appendUsers",t.data.ocs.data.users),r})).catch((function(t){m.default.isCancel(t)||e.commit("API_FAILURE",t)})):A((0,p.generateOcsUrl)("cloud/users/details?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o}),{cancelToken:O.token}).then((function(t){var r=Object.keys(t.data.ocs.data.users).length;return r>0&&e.commit("appendUsers",t.data.ocs.data.users),r})).catch((function(t){m.default.isCancel(t)||e.commit("API_FAILURE",t)}))},getGroups:function(e,t){var r=t.offset,n=t.limit,o=t.search;o="string"==typeof o?o:"";var i=-1===n?"":"&limit=".concat(n);return A((0,p.generateOcsUrl)("cloud/groups?offset={offset}&search={search}",{offset:r,search:o})+i).then((function(t){return Object.keys(t.data.ocs.data.groups).length>0&&(t.data.ocs.data.groups.forEach((function(t){e.commit("addGroup",{gid:t,displayName:t})})),!0)})).catch((function(t){return e.commit("API_FAILURE",t)}))},getUsersFromList:function(e,t){var r=t.offset,n=t.limit,o=t.search;return o="string"==typeof o?o:"",A((0,p.generateOcsUrl)("cloud/users/details?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o})).then((function(t){return Object.keys(t.data.ocs.data.users).length>0&&(e.commit("appendUsers",t.data.ocs.data.users),!0)})).catch((function(t){return e.commit("API_FAILURE",t)}))},getUsersFromGroup:function(e,t){var r=t.groupid,n=t.offset,o=t.limit;return A((0,p.generateOcsUrl)("cloud/users/{groupId}/details?offset={offset}&limit={limit}",{groupId:encodeURIComponent(r),offset:n,limit:o})).then((function(t){return e.commit("getUsersFromList",t.data.ocs.data.users)})).catch((function(t){return e.commit("API_FAILURE",t)}))},getPasswordPolicyMinLength:function(e){return!(!OC.getCapabilities().password_policy||!OC.getCapabilities().password_policy.minLength)&&(e.commit("setPasswordPolicyMinLength",OC.getCapabilities().password_policy.minLength),OC.getCapabilities().password_policy.minLength)},addGroup:function(e,t){return v().then((function(r){return I((0,p.generateOcsUrl)("cloud/groups"),{groupid:t}).then((function(r){return e.commit("addGroup",{gid:t,displayName:t}),{gid:t,displayName:t}})).catch((function(e){throw e}))})).catch((function(r){throw e.commit("API_FAILURE",{gid:t,error:r}),r}))},renameGroup:function(e,t){var r=t.groupid,n=t.displayName;return v().then((function(t){return b((0,p.generateOcsUrl)("cloud/groups/{groupId}",{groupId:encodeURIComponent(r)}),{key:"displayname",value:n}).then((function(t){return e.commit("renameGroup",{gid:r,displayName:n}),{groupid:r,displayName:n}})).catch((function(e){throw e}))})).catch((function(t){throw e.commit("API_FAILURE",{groupid:r,error:t}),t}))},removeGroup:function(e,t){return v().then((function(r){return y((0,p.generateOcsUrl)("cloud/groups/{groupId}",{groupId:encodeURIComponent(t)})).then((function(r){return e.commit("removeGroup",t)})).catch((function(e){throw e}))})).catch((function(r){return e.commit("API_FAILURE",{gid:t,error:r})}))},addUserGroup:function(e,t){var r=t.userid,n=t.gid;return v().then((function(t){return I((0,p.generateOcsUrl)("cloud/users/{userid}/groups",{userid:r}),{groupid:n}).then((function(t){return e.commit("addUserGroup",{userid:r,gid:n})})).catch((function(e){throw e}))})).catch((function(t){return e.commit("API_FAILURE",{userid:r,error:t})}))},removeUserGroup:function(e,t){var r=t.userid,n=t.gid;return v().then((function(t){return y((0,p.generateOcsUrl)("cloud/users/{userid}/groups",{userid:r}),{groupid:n}).then((function(t){return e.commit("removeUserGroup",{userid:r,gid:n})})).catch((function(e){throw e}))})).catch((function(t){throw e.commit("API_FAILURE",{userid:r,error:t}),t}))},addUserSubAdmin:function(e,t){var r=t.userid,n=t.gid;return v().then((function(t){return I((0,p.generateOcsUrl)("cloud/users/{userid}/subadmins",{userid:r}),{groupid:n}).then((function(t){return e.commit("addUserSubAdmin",{userid:r,gid:n})})).catch((function(e){throw e}))})).catch((function(t){return e.commit("API_FAILURE",{userid:r,error:t})}))},removeUserSubAdmin:function(e,t){var r=t.userid,n=t.gid;return v().then((function(t){return y((0,p.generateOcsUrl)("cloud/users/{userid}/subadmins",{userid:r}),{groupid:n}).then((function(t){return e.commit("removeUserSubAdmin",{userid:r,gid:n})})).catch((function(e){throw e}))})).catch((function(t){return e.commit("API_FAILURE",{userid:r,error:t})}))},wipeUserDevices:function(e,t){return v().then((function(e){return I((0,p.generateOcsUrl)("cloud/users/{userid}/wipe",{userid:t})).catch((function(e){throw e}))})).catch((function(r){return e.commit("API_FAILURE",{userid:t,error:r})}))},deleteUser:function(e,t){return v().then((function(r){return y((0,p.generateOcsUrl)("cloud/users/{userid}",{userid:t})).then((function(r){return e.commit("deleteUser",t)})).catch((function(e){throw e}))})).catch((function(r){return e.commit("API_FAILURE",{userid:t,error:r})}))},addUser:function(e,t){var r=e.commit,n=e.dispatch,o=t.userid,i=t.password,u=t.displayName,a=t.email,s=t.groups,c=t.subadmin,d=t.quota,f=t.language;return v().then((function(e){return I((0,p.generateOcsUrl)("cloud/users"),{userid:o,password:i,displayName:u,email:a,groups:s,subadmin:c,quota:d,language:f}).then((function(e){return n("addUserData",o||e.data.ocs.data.id)})).catch((function(e){throw e}))})).catch((function(e){throw r("API_FAILURE",{userid:o,error:e}),e}))},addUserData:function(e,t){return v().then((function(r){return A((0,p.generateOcsUrl)("cloud/users/{userid}",{userid:t})).then((function(t){return e.commit("addUserData",t)})).catch((function(e){throw e}))})).catch((function(r){return e.commit("API_FAILURE",{userid:t,error:r})}))},enableDisableUser:function(e,t){var r=t.userid,n=t.enabled,o=void 0===n||n,i=o?"enable":"disable";return v().then((function(t){return b((0,p.generateOcsUrl)("cloud/users/{userid}/{userStatus}",{userid:r,userStatus:i})).then((function(t){return e.commit("enableDisableUser",{userid:r,enabled:o})})).catch((function(e){throw e}))})).catch((function(t){return e.commit("API_FAILURE",{userid:r,error:t})}))},setUserData:function(e,t){var r=t.userid,n=t.key,o=t.value,i=["email","displayname"];return-1!==["email","language","quota","displayname","password"].indexOf(n)&&"string"==typeof o&&(-1===i.indexOf(n)&&o.length>0||-1!==i.indexOf(n))?v().then((function(t){return b((0,p.generateOcsUrl)("cloud/users/{userid}",{userid:r}),{key:n,value:o}).then((function(t){return e.commit("setUserData",{userid:r,key:n,value:o})})).catch((function(e){throw e}))})).catch((function(t){return e.commit("API_FAILURE",{userid:r,error:t})})):Promise.reject(new Error("Invalid request data"))},sendWelcomeMail:function(e,t){return v().then((function(e){return I((0,p.generateOcsUrl)("cloud/users/{userid}/welcome",{userid:t})).then((function(e){return!0})).catch((function(e){throw e}))})).catch((function(r){return e.commit("API_FAILURE",{userid:t,error:r})}))}}},x=o(64024),R=(o(36144),o(25108));function k(e,t,r,n,o,i,u){try{var a=e[i](u),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}var D={APPS_API_FAILURE:function(e,r){(0,x.x2)(t("settings","An error occurred during the request. Unable to proceed.")+"<br>"+r.error.response.data.data.message,{isHTML:!0}),R.error(e,r)},initCategories:function(e,t){var r=t.categories,n=t.updateCount;e.categories=r,e.updateCount=n},updateCategories:function(e,t){e.gettingCategoriesPromise=t},setUpdateCount:function(e,t){e.updateCount=t},addCategory:function(e,t){e.categories.push(t)},appendCategories:function(e,t){e.categories=t},setAllApps:function(e,t){e.apps=t},setError:function(e,t){var r=t.appId,n=t.error;Array.isArray(r)||(r=[r]),r.forEach((function(t){e.apps.find((function(e){return e.id===t})).error=n}))},clearError:function(e,t){var r=t.appId;t.error,e.apps.find((function(e){return e.id===r})).error=null},enableApp:function(e,t){var r=t.appId,n=t.groups,o=e.apps.find((function(e){return e.id===r}));o.active=!0,o.groups=n},disableApp:function(e,t){var r=e.apps.find((function(e){return e.id===t}));r.active=!1,r.groups=[],r.removable&&(r.canUnInstall=!0)},uninstallApp:function(e,t){e.apps.find((function(e){return e.id===t})).active=!1,e.apps.find((function(e){return e.id===t})).groups=[],e.apps.find((function(e){return e.id===t})).needsDownload=!0,e.apps.find((function(e){return e.id===t})).installed=!1,e.apps.find((function(e){return e.id===t})).canUnInstall=!1,e.apps.find((function(e){return e.id===t})).canInstall=!0},updateApp:function(e,t){var r=e.apps.find((function(e){return e.id===t})),n=r.update;r.update=null,r.version=n,e.updateCount--},resetApps:function(e){e.apps=[]},reset:function(e){e.apps=[],e.categories=[],e.updateCount=0},startLoading:function(e,t){Array.isArray(t)?t.forEach((function(t){i.ZP.set(e.loading,t,!0)})):i.ZP.set(e.loading,t,!0)},stopLoading:function(e,t){Array.isArray(t)?t.forEach((function(t){i.ZP.set(e.loading,t,!1)})):i.ZP.set(e.loading,t,!1)}},F={enableApp:function(e,r){var n,o=r.appId,i=r.groups;return n=Array.isArray(o)?o:[o],v().then((function(r){return e.commit("startLoading",n),e.commit("startLoading","install"),I((0,p.generateUrl)("settings/apps/enable"),{appIds:n,groups:i}).then((function(r){return e.commit("stopLoading",n),e.commit("stopLoading","install"),n.forEach((function(t){e.commit("enableApp",{appId:t,groups:i})})),A((0,p.generateUrl)("apps/files")).then((function(){r.data.update_required&&((0,x.JQ)(t("settings","The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds."),{onClick:function(){return window.location.reload()},close:!1}),setTimeout((function(){location.reload()}),5e3))})).catch((function(){Array.isArray(o)||e.commit("setError",{appId:n,error:t("settings","Error: This app cannot be enabled because it makes the server unstable")})}))})).catch((function(t){e.commit("stopLoading",n),e.commit("stopLoading","install"),e.commit("setError",{appId:n,error:t.response.data.data.message}),e.commit("APPS_API_FAILURE",{appId:o,error:t})}))})).catch((function(t){return e.commit("API_FAILURE",{appId:o,error:t})}))},forceEnableApp:function(e,t){var r,n=t.appId;return t.groups,r=Array.isArray(n)?n:[n],v().then((function(){return e.commit("startLoading",r),e.commit("startLoading","install"),I((0,p.generateUrl)("settings/apps/force"),{appId:n}).then((function(e){location.reload()})).catch((function(t){e.commit("stopLoading",r),e.commit("stopLoading","install"),e.commit("setError",{appId:r,error:t.response.data.data.message}),e.commit("APPS_API_FAILURE",{appId:n,error:t})}))})).catch((function(t){return e.commit("API_FAILURE",{appId:n,error:t})}))},disableApp:function(e,t){var r,n=t.appId;return r=Array.isArray(n)?n:[n],v().then((function(t){return e.commit("startLoading",r),I((0,p.generateUrl)("settings/apps/disable"),{appIds:r}).then((function(t){return e.commit("stopLoading",r),r.forEach((function(t){e.commit("disableApp",t)})),!0})).catch((function(t){e.commit("stopLoading",r),e.commit("APPS_API_FAILURE",{appId:n,error:t})}))})).catch((function(t){return e.commit("API_FAILURE",{appId:n,error:t})}))},uninstallApp:function(e,t){var r=t.appId;return v().then((function(t){return e.commit("startLoading",r),A((0,p.generateUrl)("settings/apps/uninstall/".concat(r))).then((function(t){return e.commit("stopLoading",r),e.commit("uninstallApp",r),!0})).catch((function(t){e.commit("stopLoading",r),e.commit("APPS_API_FAILURE",{appId:r,error:t})}))})).catch((function(t){return e.commit("API_FAILURE",{appId:r,error:t})}))},updateApp:function(e,t){var r=t.appId;return v().then((function(t){return e.commit("startLoading",r),e.commit("startLoading","install"),A((0,p.generateUrl)("settings/apps/update/".concat(r))).then((function(t){return e.commit("stopLoading","install"),e.commit("stopLoading",r),e.commit("updateApp",r),!0})).catch((function(t){e.commit("stopLoading",r),e.commit("stopLoading","install"),e.commit("APPS_API_FAILURE",{appId:r,error:t})}))})).catch((function(t){return e.commit("API_FAILURE",{appId:r,error:t})}))},getAllApps:function(e){return e.commit("startLoading","list"),A((0,p.generateUrl)("settings/apps/list")).then((function(t){return e.commit("setAllApps",t.data.apps),e.commit("stopLoading","list"),!0})).catch((function(t){return e.commit("API_FAILURE",t)}))},getCategories:function(e){var t,r=arguments;return(t=regeneratorRuntime.mark((function t(){var n,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((void 0===(n=(r.length>1&&void 0!==r[1]?r[1]:{}).shouldRefetchCategories)||!n)&&e.state.gettingCategoriesPromise){t.next=20;break}return e.commit("startLoading","categories"),t.prev=3,o=A((0,p.generateUrl)("settings/apps/categories")),e.commit("updateCategories",o),t.next=8,o;case 8:if(!((i=t.sent).data.length>0)){t.next=13;break}return e.commit("appendCategories",i.data),e.commit("stopLoading","categories"),t.abrupt("return",!0);case 13:return e.commit("stopLoading","categories"),t.abrupt("return",!1);case 17:t.prev=17,t.t0=t.catch(3),e.commit("API_FAILURE",t.t0);case 20:return t.abrupt("return",e.state.gettingCategoriesPromise);case 21:case"end":return t.stop()}}),t,null,[[3,17]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function u(e){k(i,n,o,u,a,"next",e)}function a(e){k(i,n,o,u,a,"throw",e)}u(void 0)}))})()}},M={state:{apps:[],categories:[],updateCount:0,loading:{},loadingList:!1,gettingCategoriesPromise:null},mutations:D,getters:{loading:function(e){return function(t){return e.loading[t]}},getCategories:function(e){return e.categories},getAllApps:function(e){return e.apps},getUpdateCount:function(e){return e.updateCount},getCategoryById:function(e){return function(t){return e.categories.find((function(e){return e.id===t}))}}},actions:F},j={state:{},mutations:{},getters:{},actions:{setAppConfig:function(e,t){var r=t.app,n=t.key,o=t.value;return v().then((function(e){return I((0,p.generateOcsUrl)("apps/provisioning_api/api/v1/config/apps/{app}/{key}",{app:r,key:n}),{value:o}).catch((function(e){throw e}))})).catch((function(t){return e.commit("API_FAILURE",{app:r,key:n,value:o,error:t})}))}}},N=o(25108);i.ZP.use(l.ZP);var Z={API_FAILURE:function(e,r){try{var n=r.error.response.data.ocs.meta.message;(0,x.x2)(t("settings","An error occurred during the request. Unable to proceed.")+"<br>"+n,{isHTML:!0})}catch(e){(0,x.x2)(t("settings","An error occurred during the request. Unable to proceed."))}N.error(e,r)}},S=new l.yh({modules:{users:_,apps:M,settings:{state:{serverData:{}},mutations:{setServerData:function(e,t){e.serverData=t}},getters:{getServerData:function(e){return e.serverData}},actions:{}},oc:j},strict:!1,mutations:Z});function T(e,t,r,n,o,i,u){try{var a=e[i](u),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function G(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){T(i,n,o,u,a,"next",e)}function a(e){T(i,n,o,u,a,"throw",e)}u(void 0)}))}}o(79954);var B=function(){return Promise.all([o.e(7874),o.e(8351)]).then(o.bind(o,14379))},z=function(){return Promise.all([o.e(7874),o.e(7418)]).then(o.bind(o,19735))};i.ZP.use(d.Z);var H,q=document.title,Y=new d.Z({mode:"history",base:(0,p.generateUrl)(""),linkActiveClass:"active",routes:[{path:"/:index(index.php/)?settings/users",component:B,props:!0,name:"users",meta:{title:function(){return t("settings","Active users")}},children:[{path:":selectedGroup",name:"group",meta:{title:function(e){return"admin"===e.params.selectedGroup?t("settings","Admins"):"disabled"===e.params.selectedGroup?t("settings","Disabled users"):decodeURIComponent(e.params.selectedGroup)}},component:B}]},{path:"/:index(index.php/)?settings/apps",component:z,props:!0,name:"apps",meta:{title:function(){return t("settings","Your apps")}},children:[{path:":category",name:"apps-category",meta:{title:(H=G(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("apps"!==r.name){e.next=2;break}return e.abrupt("return",t("settings","Your apps"));case 2:if(!f.J[r.params.category]){e.next=4;break}return e.abrupt("return",f.J[r.params.category]);case 4:return e.next=6,S.dispatch("getCategories");case 6:if(!(n=S.getters.getCategoryById(r.params.category)).displayName){e.next=9;break}return e.abrupt("return",n.displayName);case 9:case"end":return e.stop()}}),e)}))),function(e){return H.apply(this,arguments)})},component:z,children:[{path:":id",name:"apps-details",component:z}]}]}]});Y.afterEach(function(){var e=G(regeneratorRuntime.mark((function e(t){var r,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(r=(n=t.meta).title)||void 0===r?void 0:r.call(n,t);case 2:(o=e.sent)?(document.title="".concat(o," - ").concat(q),i=o,u=void 0,(u=document.getElementById("page-heading-level-1"))&&(u.textContent=i)):document.title=q;case 4:case"end":return e.stop()}var i,u}),e)})));return function(t){return e.apply(this,arguments)}}());var $=Y;i.ZP.use(u.default,{defaultHtml:!1}),(0,a.Z)(S,$),o.nc=btoa(OC.requestToken),i.ZP.prototype.t=t,i.ZP.prototype.n=n,i.ZP.prototype.OC=OC,i.ZP.prototype.OCA=OCA,i.ZP.prototype.oc_userconfig=oc_userconfig,new i.ZP({router:$,store:S,render:function(e){return e(c)}}).$mount("#content")},81490:function(e){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo="},90888:function(e){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo="}},u={};function a(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={id:e,loaded:!1,exports:{}};return i[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=i,e=[],a.O=function(t,r,n,o){if(!r){var i=1/0;for(d=0;d<e.length;d++){r=e[d][0],n=e[d][1],o=e[d][2];for(var u=!0,s=0;s<r.length;s++)(!1&o||i>=o)&&Object.keys(a.O).every((function(e){return a.O[e](r[s])}))?r.splice(s--,1):(u=!1,o<i&&(i=o));if(u){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[r,n,o]},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce((function(t,r){return a.f[r](e,t),t}),[]))},a.u=function(e){return{7418:"settings-apps-view",8351:"settings-users"}[e]+"-"+e+".js?v="+{7418:"4d5d3e469fa54fd1570b",8351:"8d867bca10b03f10b1de"}[e]},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="nextcloud:",a.l=function(e,t,n,i){if(r[e])r[e].push(t);else{var u,s;if(void 0!==n)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var p=c[d];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==o+n){u=p;break}}u||(s=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,a.nc&&u.setAttribute("nonce",a.nc),u.setAttribute("data-webpack",o+n),u.src=e),r[e]=[t];var f=function(t,n){u.onerror=u.onload=null,clearTimeout(l);var o=r[e];if(delete r[e],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((function(e){return e(n)})),t)return t(n)},l=setTimeout(f.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=f.bind(null,u.onerror),u.onload=f.bind(null,u.onload),s&&document.head.appendChild(u)}},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},a.j=8562,function(){var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&!e;)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e}(),function(){a.b=document.baseURI||self.location.href;var e={8562:0};a.f.j=function(t,r){var n=a.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise((function(r,o){n=e[t]=[r,o]}));r.push(n[2]=o);var i=a.p+a.u(t),u=new Error;a.l(i,(function(r){if(a.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;u.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",u.name="ChunkLoadError",u.type=o,u.request=i,n[1](u)}}),"chunk-"+t,t)}},a.O.j=function(t){return 0===e[t]};var t=function(t,r){var n,o,i=r[0],u=r[1],s=r[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(n in u)a.o(u,n)&&(a.m[n]=u[n]);if(s)var d=s(a)}for(t&&t(r);c<i.length;c++)o=i[c],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return a.O(d)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),a.nc=void 0;var s=a.O(void 0,[7874],(function(){return a(9685)}));s=a.O(s)}();
-//# sourceMappingURL=settings-vue-settings-apps-users-management.js.map?v=42c3a3d7c717a3bd92d1
\ No newline at end of file
+!function(){"use strict";var e,r,o,i={92652:function(e,t,r){r.d(t,{J:function(){return o}});var n=r(31352),o=Object.freeze({enabled:(0,n.Iu)("settings","Active apps"),disabled:(0,n.Iu)("settings","Disabled apps"),updates:(0,n.Iu)("settings","Updates"),"app-bundles":(0,n.Iu)("settings","App bundles"),featured:(0,n.Iu)("settings","Featured apps")})},9685:function(e,r,o){var i=o(20144),u=o(61361),a=o(83678),s={name:"App",beforeMount:function(){null!==document.getElementById("serverData")&&this.$store.commit("setServerData",JSON.parse(document.getElementById("serverData").dataset.server))}},c=(0,o(51900).Z)(s,(function(){return(0,this._self._c)("router-view")}),[],!1,null,null,null).exports,d=o(78345),p=o(79753),f=o(92652),l=o(20629),m=o(4820),g=o(10128),h=(o(65509),function(e){return e.replace(/\/$/,"")}),v=function(){return(0,g.confirmPassword)()},A=function(e,t){return m.default.get(h(e),t)},I=function(e,t){return m.default.post(h(e),t)},b=function(e,t){return m.default.put(h(e),t)},y=function(e,t){return m.default.delete(h(e),{params:t})},U=(0,o(17499).IY)().setApp("settings").detectUser().build(),P=o(25108),L=function(e,t){return 1===t?e.sort((function(e,t){return e.usercount-e.disabled<t.usercount-t.disabled})):e.sort((function(e,t){return e.name.localeCompare(t.name)}))},C={id:"",name:"",usercount:0,disabled:0,canAdd:!0,canRemove:!0},w={appendUsers:function(e,t){var r=e.users.concat(Object.keys(t).map((function(e){return t[e]})));e.usersOffset+=e.usersLimit,e.users=r},setPasswordPolicyMinLength:function(e,t){e.minPasswordLength=""!==t?t:0},initGroups:function(e,t){var r=t.groups,n=t.orderBy,o=t.userCount;e.groups=r.map((function(e){return Object.assign({},C,e)})),e.orderBy=n,e.userCount=o,e.groups=L(e.groups,e.orderBy)},addGroup:function(e,t){var r=t.gid,n=t.displayName;try{if(void 0!==e.groups.find((function(e){return e.id===r})))return;var o=Object.assign({},C,{id:r,name:n});e.groups.push(o),e.groups=L(e.groups,e.orderBy)}catch(e){P.error("Can't create group",e)}},renameGroup:function(e,t){var r=t.gid,n=t.displayName,o=e.groups.findIndex((function(e){return e.id===r}));if(o>=0){var i=e.groups[o];i.name=n,e.groups.splice(o,1,i),e.groups=L(e.groups,e.orderBy)}},removeGroup:function(e,t){var r=e.groups.findIndex((function(e){return e.id===t}));r>=0&&e.groups.splice(r,1)},addUserGroup:function(e,t){var r=t.userid,n=t.gid,o=e.groups.find((function(e){return e.id===n})),i=e.users.find((function(e){return e.id===r}));o&&i.enabled&&e.userCount>0&&o.usercount++,i.groups.push(n),e.groups=L(e.groups,e.orderBy)},removeUserGroup:function(e,t){var r=t.userid,n=t.gid,o=e.groups.find((function(e){return e.id===n})),i=e.users.find((function(e){return e.id===r}));o&&i.enabled&&e.userCount>0&&o.usercount--;var u=i.groups;u.splice(u.indexOf(n),1),e.groups=L(e.groups,e.orderBy)},addUserSubAdmin:function(e,t){var r=t.userid,n=t.gid;e.users.find((function(e){return e.id===r})).subadmin.push(n)},removeUserSubAdmin:function(e,t){var r=t.userid,n=t.gid,o=e.users.find((function(e){return e.id===r})).subadmin;o.splice(o.indexOf(n),1)},deleteUser:function(e,t){var r=e.users.findIndex((function(e){return e.id===t}));this.commit("updateUserCounts",{user:e.users[r],actionType:"remove"}),e.users.splice(r,1)},addUserData:function(e,t){var r=t.data.ocs.data;e.users.push(r),this.commit("updateUserCounts",{user:r,actionType:"create"})},enableDisableUser:function(e,t){var r=t.userid,n=t.enabled,o=e.users.find((function(e){return e.id===r}));o.enabled=n,this.commit("updateUserCounts",{user:o,actionType:n?"enable":"disable"})},updateUserCounts:function(e,t){var r=t.user,n=t.actionType,o=e.groups.find((function(e){return"disabled"===e.id}));switch(n){case"enable":case"disable":o.usercount+=r.enabled?-1:1,e.userCount+=r.enabled?1:-1,r.groups.forEach((function(t){e.groups.find((function(e){return e.id===t})).disabled+=r.enabled?-1:1}));break;case"create":e.userCount++,r.groups.forEach((function(t){e.groups.find((function(e){return e.id===t})).usercount++}));break;case"remove":r.enabled?(e.userCount--,r.groups.forEach((function(t){var r=e.groups.find((function(e){return e.id===t}));r?r.usercount--:P.warn("User group "+t+" does not exist during user removal")}))):(o.usercount--,r.groups.forEach((function(t){e.groups.find((function(e){return e.id===t})).disabled--})));break;default:U.error("Unknown action type in updateUserCounts: '".concat(n,"'"))}},setUserData:function(e,t){var r=t.userid,n=t.key,o=t.value;if("quota"===n){var i=OC.Util.computerFileSize(o);e.users.find((function(e){return e.id===r}))[n][n]=null!==i?i:o}else e.users.find((function(e){return e.id===r}))[n]=o},resetUsers:function(e){e.users=[],e.usersOffset=0}},E=m.default.CancelToken,O=null,_={state:{users:[],groups:[],orderBy:1,minPasswordLength:0,usersOffset:0,usersLimit:25,userCount:0},mutations:w,getters:{getUsers:function(e){return e.users},getGroups:function(e){return e.groups},getSubadminGroups:function(e){return e.groups.filter((function(e){return"admin"!==e.id&&"disabled"!==e.id}))},getPasswordPolicyMinLength:function(e){return e.minPasswordLength},getUsersOffset:function(e){return e.usersOffset},getUsersLimit:function(e){return e.usersLimit},getUserCount:function(e){return e.userCount}},actions:{getUsers:function(e,t){var r=t.offset,n=t.limit,o=t.search,i=t.group;return O&&O.cancel("Operation canceled by another search request."),O=E.source(),o=(o="string"==typeof o?o:"").replace(/in:[^\s]+/g,"").trim(),""!==(i="string"==typeof i?i:"")?A((0,p.generateOcsUrl)("cloud/groups/{group}/users/details?offset={offset}&limit={limit}&search={search}",{group:encodeURIComponent(i),offset:r,limit:n,search:o}),{cancelToken:O.token}).then((function(t){var r=Object.keys(t.data.ocs.data.users).length;return r>0&&e.commit("appendUsers",t.data.ocs.data.users),r})).catch((function(t){m.default.isCancel(t)||e.commit("API_FAILURE",t)})):A((0,p.generateOcsUrl)("cloud/users/details?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o}),{cancelToken:O.token}).then((function(t){var r=Object.keys(t.data.ocs.data.users).length;return r>0&&e.commit("appendUsers",t.data.ocs.data.users),r})).catch((function(t){m.default.isCancel(t)||e.commit("API_FAILURE",t)}))},getGroups:function(e,t){var r=t.offset,n=t.limit,o=t.search;o="string"==typeof o?o:"";var i=-1===n?"":"&limit=".concat(n);return A((0,p.generateOcsUrl)("cloud/groups?offset={offset}&search={search}",{offset:r,search:o})+i).then((function(t){return Object.keys(t.data.ocs.data.groups).length>0&&(t.data.ocs.data.groups.forEach((function(t){e.commit("addGroup",{gid:t,displayName:t})})),!0)})).catch((function(t){return e.commit("API_FAILURE",t)}))},getUsersFromList:function(e,t){var r=t.offset,n=t.limit,o=t.search;return o="string"==typeof o?o:"",A((0,p.generateOcsUrl)("cloud/users/details?offset={offset}&limit={limit}&search={search}",{offset:r,limit:n,search:o})).then((function(t){return Object.keys(t.data.ocs.data.users).length>0&&(e.commit("appendUsers",t.data.ocs.data.users),!0)})).catch((function(t){return e.commit("API_FAILURE",t)}))},getUsersFromGroup:function(e,t){var r=t.groupid,n=t.offset,o=t.limit;return A((0,p.generateOcsUrl)("cloud/users/{groupId}/details?offset={offset}&limit={limit}",{groupId:encodeURIComponent(r),offset:n,limit:o})).then((function(t){return e.commit("getUsersFromList",t.data.ocs.data.users)})).catch((function(t){return e.commit("API_FAILURE",t)}))},getPasswordPolicyMinLength:function(e){return!(!OC.getCapabilities().password_policy||!OC.getCapabilities().password_policy.minLength)&&(e.commit("setPasswordPolicyMinLength",OC.getCapabilities().password_policy.minLength),OC.getCapabilities().password_policy.minLength)},addGroup:function(e,t){return v().then((function(r){return I((0,p.generateOcsUrl)("cloud/groups"),{groupid:t}).then((function(r){return e.commit("addGroup",{gid:t,displayName:t}),{gid:t,displayName:t}})).catch((function(e){throw e}))})).catch((function(r){throw e.commit("API_FAILURE",{gid:t,error:r}),r}))},renameGroup:function(e,t){var r=t.groupid,n=t.displayName;return v().then((function(t){return b((0,p.generateOcsUrl)("cloud/groups/{groupId}",{groupId:encodeURIComponent(r)}),{key:"displayname",value:n}).then((function(t){return e.commit("renameGroup",{gid:r,displayName:n}),{groupid:r,displayName:n}})).catch((function(e){throw e}))})).catch((function(t){throw e.commit("API_FAILURE",{groupid:r,error:t}),t}))},removeGroup:function(e,t){return v().then((function(r){return y((0,p.generateOcsUrl)("cloud/groups/{groupId}",{groupId:encodeURIComponent(t)})).then((function(r){return e.commit("removeGroup",t)})).catch((function(e){throw e}))})).catch((function(r){return e.commit("API_FAILURE",{gid:t,error:r})}))},addUserGroup:function(e,t){var r=t.userid,n=t.gid;return v().then((function(t){return I((0,p.generateOcsUrl)("cloud/users/{userid}/groups",{userid:r}),{groupid:n}).then((function(t){return e.commit("addUserGroup",{userid:r,gid:n})})).catch((function(e){throw e}))})).catch((function(t){return e.commit("API_FAILURE",{userid:r,error:t})}))},removeUserGroup:function(e,t){var r=t.userid,n=t.gid;return v().then((function(t){return y((0,p.generateOcsUrl)("cloud/users/{userid}/groups",{userid:r}),{groupid:n}).then((function(t){return e.commit("removeUserGroup",{userid:r,gid:n})})).catch((function(e){throw e}))})).catch((function(t){throw e.commit("API_FAILURE",{userid:r,error:t}),t}))},addUserSubAdmin:function(e,t){var r=t.userid,n=t.gid;return v().then((function(t){return I((0,p.generateOcsUrl)("cloud/users/{userid}/subadmins",{userid:r}),{groupid:n}).then((function(t){return e.commit("addUserSubAdmin",{userid:r,gid:n})})).catch((function(e){throw e}))})).catch((function(t){return e.commit("API_FAILURE",{userid:r,error:t})}))},removeUserSubAdmin:function(e,t){var r=t.userid,n=t.gid;return v().then((function(t){return y((0,p.generateOcsUrl)("cloud/users/{userid}/subadmins",{userid:r}),{groupid:n}).then((function(t){return e.commit("removeUserSubAdmin",{userid:r,gid:n})})).catch((function(e){throw e}))})).catch((function(t){return e.commit("API_FAILURE",{userid:r,error:t})}))},wipeUserDevices:function(e,t){return v().then((function(e){return I((0,p.generateOcsUrl)("cloud/users/{userid}/wipe",{userid:t})).catch((function(e){throw e}))})).catch((function(r){return e.commit("API_FAILURE",{userid:t,error:r})}))},deleteUser:function(e,t){return v().then((function(r){return y((0,p.generateOcsUrl)("cloud/users/{userid}",{userid:t})).then((function(r){return e.commit("deleteUser",t)})).catch((function(e){throw e}))})).catch((function(r){return e.commit("API_FAILURE",{userid:t,error:r})}))},addUser:function(e,t){var r=e.commit,n=e.dispatch,o=t.userid,i=t.password,u=t.displayName,a=t.email,s=t.groups,c=t.subadmin,d=t.quota,f=t.language;return v().then((function(e){return I((0,p.generateOcsUrl)("cloud/users"),{userid:o,password:i,displayName:u,email:a,groups:s,subadmin:c,quota:d,language:f}).then((function(e){return n("addUserData",o||e.data.ocs.data.id)})).catch((function(e){throw e}))})).catch((function(e){throw r("API_FAILURE",{userid:o,error:e}),e}))},addUserData:function(e,t){return v().then((function(r){return A((0,p.generateOcsUrl)("cloud/users/{userid}",{userid:t})).then((function(t){return e.commit("addUserData",t)})).catch((function(e){throw e}))})).catch((function(r){return e.commit("API_FAILURE",{userid:t,error:r})}))},enableDisableUser:function(e,t){var r=t.userid,n=t.enabled,o=void 0===n||n,i=o?"enable":"disable";return v().then((function(t){return b((0,p.generateOcsUrl)("cloud/users/{userid}/{userStatus}",{userid:r,userStatus:i})).then((function(t){return e.commit("enableDisableUser",{userid:r,enabled:o})})).catch((function(e){throw e}))})).catch((function(t){return e.commit("API_FAILURE",{userid:r,error:t})}))},setUserData:function(e,t){var r=t.userid,n=t.key,o=t.value,i=["email","displayname"];return-1!==["email","language","quota","displayname","password"].indexOf(n)&&"string"==typeof o&&(-1===i.indexOf(n)&&o.length>0||-1!==i.indexOf(n))?v().then((function(t){return b((0,p.generateOcsUrl)("cloud/users/{userid}",{userid:r}),{key:n,value:o}).then((function(t){return e.commit("setUserData",{userid:r,key:n,value:o})})).catch((function(e){throw e}))})).catch((function(t){return e.commit("API_FAILURE",{userid:r,error:t})})):Promise.reject(new Error("Invalid request data"))},sendWelcomeMail:function(e,t){return v().then((function(e){return I((0,p.generateOcsUrl)("cloud/users/{userid}/welcome",{userid:t})).then((function(e){return!0})).catch((function(e){throw e}))})).catch((function(r){return e.commit("API_FAILURE",{userid:t,error:r})}))}}},x=o(64024),R=(o(36144),o(25108));function k(e,t,r,n,o,i,u){try{var a=e[i](u),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}var D={APPS_API_FAILURE:function(e,r){(0,x.x2)(t("settings","An error occurred during the request. Unable to proceed.")+"<br>"+r.error.response.data.data.message,{isHTML:!0}),R.error(e,r)},initCategories:function(e,t){var r=t.categories,n=t.updateCount;e.categories=r,e.updateCount=n},updateCategories:function(e,t){e.gettingCategoriesPromise=t},setUpdateCount:function(e,t){e.updateCount=t},addCategory:function(e,t){e.categories.push(t)},appendCategories:function(e,t){e.categories=t},setAllApps:function(e,t){e.apps=t},setError:function(e,t){var r=t.appId,n=t.error;Array.isArray(r)||(r=[r]),r.forEach((function(t){e.apps.find((function(e){return e.id===t})).error=n}))},clearError:function(e,t){var r=t.appId;t.error,e.apps.find((function(e){return e.id===r})).error=null},enableApp:function(e,t){var r=t.appId,n=t.groups,o=e.apps.find((function(e){return e.id===r}));o.active=!0,o.groups=n},disableApp:function(e,t){var r=e.apps.find((function(e){return e.id===t}));r.active=!1,r.groups=[],r.removable&&(r.canUnInstall=!0)},uninstallApp:function(e,t){e.apps.find((function(e){return e.id===t})).active=!1,e.apps.find((function(e){return e.id===t})).groups=[],e.apps.find((function(e){return e.id===t})).needsDownload=!0,e.apps.find((function(e){return e.id===t})).installed=!1,e.apps.find((function(e){return e.id===t})).canUnInstall=!1,e.apps.find((function(e){return e.id===t})).canInstall=!0},updateApp:function(e,t){var r=e.apps.find((function(e){return e.id===t})),n=r.update;r.update=null,r.version=n,e.updateCount--},resetApps:function(e){e.apps=[]},reset:function(e){e.apps=[],e.categories=[],e.updateCount=0},startLoading:function(e,t){Array.isArray(t)?t.forEach((function(t){i.ZP.set(e.loading,t,!0)})):i.ZP.set(e.loading,t,!0)},stopLoading:function(e,t){Array.isArray(t)?t.forEach((function(t){i.ZP.set(e.loading,t,!1)})):i.ZP.set(e.loading,t,!1)}},F={enableApp:function(e,r){var n,o=r.appId,i=r.groups;return n=Array.isArray(o)?o:[o],v().then((function(r){return e.commit("startLoading",n),e.commit("startLoading","install"),I((0,p.generateUrl)("settings/apps/enable"),{appIds:n,groups:i}).then((function(r){return e.commit("stopLoading",n),e.commit("stopLoading","install"),n.forEach((function(t){e.commit("enableApp",{appId:t,groups:i})})),A((0,p.generateUrl)("apps/files")).then((function(){r.data.update_required&&((0,x.JQ)(t("settings","The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds."),{onClick:function(){return window.location.reload()},close:!1}),setTimeout((function(){location.reload()}),5e3))})).catch((function(){Array.isArray(o)||e.commit("setError",{appId:n,error:t("settings","Error: This app cannot be enabled because it makes the server unstable")})}))})).catch((function(t){e.commit("stopLoading",n),e.commit("stopLoading","install"),e.commit("setError",{appId:n,error:t.response.data.data.message}),e.commit("APPS_API_FAILURE",{appId:o,error:t})}))})).catch((function(t){return e.commit("API_FAILURE",{appId:o,error:t})}))},forceEnableApp:function(e,t){var r,n=t.appId;return t.groups,r=Array.isArray(n)?n:[n],v().then((function(){return e.commit("startLoading",r),e.commit("startLoading","install"),I((0,p.generateUrl)("settings/apps/force"),{appId:n}).then((function(e){location.reload()})).catch((function(t){e.commit("stopLoading",r),e.commit("stopLoading","install"),e.commit("setError",{appId:r,error:t.response.data.data.message}),e.commit("APPS_API_FAILURE",{appId:n,error:t})}))})).catch((function(t){return e.commit("API_FAILURE",{appId:n,error:t})}))},disableApp:function(e,t){var r,n=t.appId;return r=Array.isArray(n)?n:[n],v().then((function(t){return e.commit("startLoading",r),I((0,p.generateUrl)("settings/apps/disable"),{appIds:r}).then((function(t){return e.commit("stopLoading",r),r.forEach((function(t){e.commit("disableApp",t)})),!0})).catch((function(t){e.commit("stopLoading",r),e.commit("APPS_API_FAILURE",{appId:n,error:t})}))})).catch((function(t){return e.commit("API_FAILURE",{appId:n,error:t})}))},uninstallApp:function(e,t){var r=t.appId;return v().then((function(t){return e.commit("startLoading",r),A((0,p.generateUrl)("settings/apps/uninstall/".concat(r))).then((function(t){return e.commit("stopLoading",r),e.commit("uninstallApp",r),!0})).catch((function(t){e.commit("stopLoading",r),e.commit("APPS_API_FAILURE",{appId:r,error:t})}))})).catch((function(t){return e.commit("API_FAILURE",{appId:r,error:t})}))},updateApp:function(e,t){var r=t.appId;return v().then((function(t){return e.commit("startLoading",r),e.commit("startLoading","install"),A((0,p.generateUrl)("settings/apps/update/".concat(r))).then((function(t){return e.commit("stopLoading","install"),e.commit("stopLoading",r),e.commit("updateApp",r),!0})).catch((function(t){e.commit("stopLoading",r),e.commit("stopLoading","install"),e.commit("APPS_API_FAILURE",{appId:r,error:t})}))})).catch((function(t){return e.commit("API_FAILURE",{appId:r,error:t})}))},getAllApps:function(e){return e.commit("startLoading","list"),A((0,p.generateUrl)("settings/apps/list")).then((function(t){return e.commit("setAllApps",t.data.apps),e.commit("stopLoading","list"),!0})).catch((function(t){return e.commit("API_FAILURE",t)}))},getCategories:function(e){var t,r=arguments;return(t=regeneratorRuntime.mark((function t(){var n,o,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((void 0===(n=(r.length>1&&void 0!==r[1]?r[1]:{}).shouldRefetchCategories)||!n)&&e.state.gettingCategoriesPromise){t.next=20;break}return e.commit("startLoading","categories"),t.prev=3,o=A((0,p.generateUrl)("settings/apps/categories")),e.commit("updateCategories",o),t.next=8,o;case 8:if(!((i=t.sent).data.length>0)){t.next=13;break}return e.commit("appendCategories",i.data),e.commit("stopLoading","categories"),t.abrupt("return",!0);case 13:return e.commit("stopLoading","categories"),t.abrupt("return",!1);case 17:t.prev=17,t.t0=t.catch(3),e.commit("API_FAILURE",t.t0);case 20:return t.abrupt("return",e.state.gettingCategoriesPromise);case 21:case"end":return t.stop()}}),t,null,[[3,17]])})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function u(e){k(i,n,o,u,a,"next",e)}function a(e){k(i,n,o,u,a,"throw",e)}u(void 0)}))})()}},M={state:{apps:[],categories:[],updateCount:0,loading:{},loadingList:!1,gettingCategoriesPromise:null},mutations:D,getters:{loading:function(e){return function(t){return e.loading[t]}},getCategories:function(e){return e.categories},getAllApps:function(e){return e.apps},getUpdateCount:function(e){return e.updateCount},getCategoryById:function(e){return function(t){return e.categories.find((function(e){return e.id===t}))}}},actions:F},j={state:{},mutations:{},getters:{},actions:{setAppConfig:function(e,t){var r=t.app,n=t.key,o=t.value;return v().then((function(e){return I((0,p.generateOcsUrl)("apps/provisioning_api/api/v1/config/apps/{app}/{key}",{app:r,key:n}),{value:o}).catch((function(e){throw e}))})).catch((function(t){return e.commit("API_FAILURE",{app:r,key:n,value:o,error:t})}))}}},N=o(25108);i.ZP.use(l.ZP);var Z={API_FAILURE:function(e,r){try{var n=r.error.response.data.ocs.meta.message;(0,x.x2)(t("settings","An error occurred during the request. Unable to proceed.")+"<br>"+n,{isHTML:!0})}catch(e){(0,x.x2)(t("settings","An error occurred during the request. Unable to proceed."))}N.error(e,r)}},S=new l.yh({modules:{users:_,apps:M,settings:{state:{serverData:{}},mutations:{setServerData:function(e,t){e.serverData=t}},getters:{getServerData:function(e){return e.serverData}},actions:{}},oc:j},strict:!1,mutations:Z});function T(e,t,r,n,o,i,u){try{var a=e[i](u),s=a.value}catch(e){return void r(e)}a.done?t(s):Promise.resolve(s).then(n,o)}function G(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function u(e){T(i,n,o,u,a,"next",e)}function a(e){T(i,n,o,u,a,"throw",e)}u(void 0)}))}}o(79954);var B=function(){return Promise.all([o.e(7874),o.e(8351)]).then(o.bind(o,14379))},z=function(){return Promise.all([o.e(7874),o.e(7418)]).then(o.bind(o,19735))};i.ZP.use(d.Z);var H,q=document.title,Y=new d.Z({mode:"history",base:(0,p.generateUrl)(""),linkActiveClass:"active",routes:[{path:"/:index(index.php/)?settings/users",component:B,props:!0,name:"users",meta:{title:function(){return t("settings","Active users")}},children:[{path:":selectedGroup",name:"group",meta:{title:function(e){return"admin"===e.params.selectedGroup?t("settings","Admins"):"disabled"===e.params.selectedGroup?t("settings","Disabled users"):decodeURIComponent(e.params.selectedGroup)}},component:B}]},{path:"/:index(index.php/)?settings/apps",component:z,props:!0,name:"apps",meta:{title:function(){return t("settings","Your apps")}},children:[{path:":category",name:"apps-category",meta:{title:(H=G(regeneratorRuntime.mark((function e(r){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("apps"!==r.name){e.next=2;break}return e.abrupt("return",t("settings","Your apps"));case 2:if(!f.J[r.params.category]){e.next=4;break}return e.abrupt("return",f.J[r.params.category]);case 4:return e.next=6,S.dispatch("getCategories");case 6:if(!(n=S.getters.getCategoryById(r.params.category)).displayName){e.next=9;break}return e.abrupt("return",n.displayName);case 9:case"end":return e.stop()}}),e)}))),function(e){return H.apply(this,arguments)})},component:z,children:[{path:":id",name:"apps-details",component:z}]}]}]});Y.afterEach(function(){var e=G(regeneratorRuntime.mark((function e(t){var r,n,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(r=(n=t.meta).title)||void 0===r?void 0:r.call(n,t);case 2:(o=e.sent)?(document.title="".concat(o," - ").concat(q),i=o,u=void 0,(u=document.getElementById("page-heading-level-1"))&&(u.textContent=i)):document.title=q;case 4:case"end":return e.stop()}var i,u}),e)})));return function(t){return e.apply(this,arguments)}}());var $=Y;i.ZP.use(u.default,{defaultHtml:!1}),(0,a.Z)(S,$),o.nc=btoa(OC.requestToken),i.ZP.prototype.t=t,i.ZP.prototype.n=n,i.ZP.prototype.OC=OC,i.ZP.prototype.OCA=OCA,i.ZP.prototype.oc_userconfig=oc_userconfig,new i.ZP({router:$,store:S,render:function(e){return e(c)}}).$mount("#content")},81490:function(e){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6Ii8+Cjwvc3ZnPgo="},90888:function(e){e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMTYiIHdpZHRoPSIxNiI+CiAgPHBhdGggZD0iTTE0IDEyLjNMMTIuMyAxNCA4IDkuNyAzLjcgMTQgMiAxMi4zIDYuMyA4IDIgMy43IDMuNyAyIDggNi4zIDEyLjMgMiAxNCAzLjcgOS43IDh6IiBzdHlsZT0iZmlsbC1vcGFjaXR5OjE7ZmlsbDojZmZmZmZmIi8+Cjwvc3ZnPgo="}},u={};function a(e){var t=u[e];if(void 0!==t)return t.exports;var r=u[e]={id:e,loaded:!1,exports:{}};return i[e].call(r.exports,r,r.exports,a),r.loaded=!0,r.exports}a.m=i,e=[],a.O=function(t,r,n,o){if(!r){var i=1/0;for(d=0;d<e.length;d++){r=e[d][0],n=e[d][1],o=e[d][2];for(var u=!0,s=0;s<r.length;s++)(!1&o||i>=o)&&Object.keys(a.O).every((function(e){return a.O[e](r[s])}))?r.splice(s--,1):(u=!1,o<i&&(i=o));if(u){e.splice(d--,1);var c=n();void 0!==c&&(t=c)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[r,n,o]},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.f={},a.e=function(e){return Promise.all(Object.keys(a.f).reduce((function(t,r){return a.f[r](e,t),t}),[]))},a.u=function(e){return{7418:"settings-apps-view",8351:"settings-users"}[e]+"-"+e+".js?v="+{7418:"4d5d3e469fa54fd1570b",8351:"8d867bca10b03f10b1de"}[e]},a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},o="nextcloud:",a.l=function(e,t,n,i){if(r[e])r[e].push(t);else{var u,s;if(void 0!==n)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var p=c[d];if(p.getAttribute("src")==e||p.getAttribute("data-webpack")==o+n){u=p;break}}u||(s=!0,(u=document.createElement("script")).charset="utf-8",u.timeout=120,a.nc&&u.setAttribute("nonce",a.nc),u.setAttribute("data-webpack",o+n),u.src=e),r[e]=[t];var f=function(t,n){u.onerror=u.onload=null,clearTimeout(l);var o=r[e];if(delete r[e],u.parentNode&&u.parentNode.removeChild(u),o&&o.forEach((function(e){return e(n)})),t)return t(n)},l=setTimeout(f.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=f.bind(null,u.onerror),u.onload=f.bind(null,u.onload),s&&document.head.appendChild(u)}},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},a.j=8562,function(){var e;a.g.importScripts&&(e=a.g.location+"");var t=a.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&!e;)e=r[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),a.p=e}(),function(){a.b=document.baseURI||self.location.href;var e={8562:0};a.f.j=function(t,r){var n=a.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var o=new Promise((function(r,o){n=e[t]=[r,o]}));r.push(n[2]=o);var i=a.p+a.u(t),u=new Error;a.l(i,(function(r){if(a.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var o=r&&("load"===r.type?"missing":r.type),i=r&&r.target&&r.target.src;u.message="Loading chunk "+t+" failed.\n("+o+": "+i+")",u.name="ChunkLoadError",u.type=o,u.request=i,n[1](u)}}),"chunk-"+t,t)}},a.O.j=function(t){return 0===e[t]};var t=function(t,r){var n,o,i=r[0],u=r[1],s=r[2],c=0;if(i.some((function(t){return 0!==e[t]}))){for(n in u)a.o(u,n)&&(a.m[n]=u[n]);if(s)var d=s(a)}for(t&&t(r);c<i.length;c++)o=i[c],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return a.O(d)},r=self.webpackChunknextcloud=self.webpackChunknextcloud||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),a.nc=void 0;var s=a.O(void 0,[7874],(function(){return a(9685)}));s=a.O(s)}();
+//# sourceMappingURL=settings-vue-settings-apps-users-management.js.map?v=aebb8c1b0a63291749f6
\ No newline at end of file
index d9c2f73ae8a230ade5b93463d3fa7453439eecc6..de84def4c57d6133141fd0ccaf0e75e87b819467 100644 (file)
@@ -1 +1 @@
-{"version":3,"file":"settings-vue-settings-apps-users-management.js?v=42c3a3d7c717a3bd92d1","mappings":";6BAAIA,ECAAC,EACAC,0ECwBSC,EAAoBC,OAAOC,OAAO,CAC9CC,SAASC,EAAAA,EAAAA,IAAE,WAAY,eACvBC,UAAUD,EAAAA,EAAAA,IAAE,WAAY,iBACxBE,SAASF,EAAAA,EAAAA,IAAE,WAAY,WACvB,eAAeA,EAAAA,EAAAA,IAAE,WAAY,eAC7BG,UAAUH,EAAAA,EAAAA,IAAE,WAAY,8EC9BiJ,EC2B1K,CACAI,KAAAA,MACAC,YAAAA,WAGA,OADA,uCAEA,oGAEA,GCjBA,GAXgB,cACd,GCRW,WAA+C,OAAOC,EAA5BC,KAAYC,MAAMF,IAAa,cACtE,GACsB,IDSpB,EACA,KACA,KACA,MAI8B,yEEY1BG,YAAW,SAASC,GACzB,OAAOA,EAAIC,QAAQ,MAAO,GAC3B,GAEA,EAiCa,WACX,OAAOC,EAAAA,EAAAA,kBACR,EAnCD,EAoCI,SAACF,EAAKG,GACR,OAAOC,EAAAA,QAAAA,IAAUL,EAASC,GAAMG,EACjC,EAtCD,EAuCK,SAACH,EAAKK,GACT,OAAOD,EAAAA,QAAAA,KAAWL,EAASC,GAAMK,EAClC,EAzCD,EA6CI,SAACL,EAAKK,GACR,OAAOD,EAAAA,QAAAA,IAAUL,EAASC,GAAMK,EACjC,EA/CD,EAgDO,SAACL,EAAKK,GACX,OAAOD,EAAAA,QAAAA,OAAaL,EAASC,GAA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,EAAmBvS,KAAOkS,EAAqBvB,KAAK,KAAM4B,EAAmBvS,KAAK2Q,KAAK4B,OCvFvF9F,EAAoBsD,QAAKnD,ECGzB,IAAI4F,EAAsB/F,EAAoBU,OAAEP,EAAW,CAAC,OAAO,WAAa,OAAOH,EAAoB,KAAO,IAClH+F,EAAsB/F,EAAoBU,EAAEqF","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/settings/src/constants/AppsConstants.js","webpack:///nextcloud/apps/settings/src/App.vue?vue&type=script&lang=js&","webpack:///nextcloud/apps/settings/src/App.vue","webpack://nextcloud/./apps/settings/src/App.vue?536c","webpack://nextcloud/./apps/settings/src/App.vue?4d15","webpack:///nextcloud/apps/settings/src/store/api.js","webpack:///nextcloud/apps/settings/src/logger.js","webpack:///nextcloud/apps/settings/src/store/users.js","webpack:///nextcloud/apps/settings/src/store/apps.js","webpack:///nextcloud/apps/settings/src/store/oc.js","webpack:///nextcloud/apps/settings/src/store/index.js","webpack:///nextcloud/apps/settings/src/store/settings.js","webpack:///nextcloud/apps/settings/src/router.js","webpack:///nextcloud/core/src/OCP/accessibility.js","webpack:///nextcloud/apps/settings/src/main-apps-users-management.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * @copyright 2022, Julia Kirschenheuter <julia.kirschenheuter@nextcloud.com>\n *\n * @author Julia Kirschenheuter <julia.kirschenheuter@nextcloud.com>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport { translate as t } from '@nextcloud/l10n'\n\n/** Enum of verification constants, according to Apps */\nexport const APPS_SECTION_ENUM = Object.freeze({\n\tenabled: t('settings', 'Active apps'),\n\tdisabled: t('settings', 'Disabled apps'),\n\tupdates: t('settings', 'Updates'),\n\t'app-bundles': t('settings', 'App bundles'),\n\tfeatured: t('settings', 'Featured apps'),\n})\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","<!--\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  -->\n\n<template>\n\t<router-view />\n</template>\n\n<script>\nexport default {\n\tname: 'App',\n\tbeforeMount() {\n\t\t// importing server data into the store\n\t\tconst serverDataElmt = document.getElementById('serverData')\n\t\tif (serverDataElmt !== null) {\n\t\t\tthis.$store.commit('setServerData', JSON.parse(document.getElementById('serverData').dataset.server))\n\t\t}\n\t},\n}\n</script>\n","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=50420604&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('router-view')\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n * @author Sujith Haridasan <sujith.h@gmail.com>\n *\n * @license AGPL-3.0-or-later\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 */\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 * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('settings')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author Arthur Schiwon <blizzz@arthur-schiwon.de>\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author Daniel Calviño Sánchez <danxuliu@gmail.com>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n * @author Vincent Petry <vincent@nextcloud.com>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport api from './api'\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport logger from '../logger'\n\nconst orderGroups = function(groups, orderBy) {\n\t/* const SORT_USERCOUNT = 1;\n\t * const SORT_GROUPNAME = 2;\n\t * https://github.com/nextcloud/server/blob/208e38e84e1a07a49699aa90dc5b7272d24489f0/lib/private/Group/MetaData.php#L34\n\t */\n\tif (orderBy === 1) {\n\t\treturn groups.sort((a, b) => a.usercount - a.disabled < b.usercount - b.disabled)\n\t} else {\n\t\treturn groups.sort((a, b) => a.name.localeCompare(b.name))\n\t}\n}\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: 1,\n\tminPasswordLength: 0,\n\tusersOffset: 0,\n\tusersLimit: 25,\n\tuserCount: 0,\n}\n\nconst mutations = {\n\tappendUsers(state, usersObj) {\n\t\t// convert obj to array\n\t\tconst users = state.users.concat(Object.keys(usersObj).map(userid => usersObj[userid]))\n\t\tstate.usersOffset += state.usersLimit\n\t\tstate.users = users\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\tstate.groups = orderGroups(state.groups, state.orderBy)\n\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.push(group)\n\t\t\tstate.groups = orderGroups(state.groups, state.orderBy)\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\tstate.groups = orderGroups(state.groups, state.orderBy)\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\tstate.groups = orderGroups(state.groups, state.orderBy)\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\tstate.groups = orderGroups(state.groups, state.orderBy)\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.push(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\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 = OC.Util.computerFileSize(value)\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},\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\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\tgetUserCount(state) {\n\t\treturn state.userCount\n\t},\n}\n\nconst CancelToken = axios.CancelToken\nlet searchRequestCancelSource = null\n\nconst actions = {\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\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\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 (OC.getCapabilities().password_policy && OC.getCapabilities().password_policy.minLength) {\n\t\t\tcontext.commit('setPasswordPolicyMinLength', OC.getCapabilities().password_policy.minLength)\n\t\t\treturn OC.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 * @return {Promise}\n\t */\n\taddUser({ commit, dispatch }, { userid, password, displayName, email, groups, subadmin, quota, language }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users'), { userid, password, displayName, email, groups, subadmin, quota, language })\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']\n\t\tif (['email', 'language', 'quota', 'displayname', 'password'].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 * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport api from './api'\nimport Vue from 'vue'\nimport { generateUrl } from '@nextcloud/router'\nimport { showError, showInfo } from '@nextcloud/dialogs'\nimport '@nextcloud/dialogs/dist/index.css'\n\nconst state = {\n\tapps: [],\n\tcategories: [],\n\tupdateCount: 0,\n\tloading: {},\n\tloadingList: false,\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\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\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\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}\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\t// TODO: find a cleaner solution\n\t\t\t\t\tlocation.reload()\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\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 * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport api from './api'\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 * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport Vue from 'vue'\nimport Vuex, { Store } from 'vuex'\nimport users from './users'\nimport apps from './apps'\nimport settings from './settings'\nimport oc from './oc'\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\nexport default new Store({\n\tmodules: {\n\t\tusers,\n\t\tapps,\n\t\tsettings,\n\t\toc,\n\t},\n\tstrict: debug,\n\n\tmutations,\n})\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\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 */\n\nconst state = {\n\tserverData: {},\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 * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport Vue from 'vue'\nimport Router from 'vue-router'\nimport { generateUrl } from '@nextcloud/router'\nimport { APPS_SECTION_ENUM } from './constants/AppsConstants.js'\nimport store from './store/index.js'\nimport { setPageHeading } from '../../../core/src/OCP/accessibility.js'\n\n// Dynamic loading\nconst Users = () => import(/* webpackChunkName: 'settings-users' */'./views/Users')\nconst Apps = () => import(/* webpackChunkName: 'settings-apps-view' */'./views/Apps')\n\nVue.use(Router)\n\n/*\n * This is the list of routes where the vuejs app will\n * take over php to provide data\n * You need to forward the php routing (routes.php) to\n * the settings-vue template, where the vue-router will\n * ensure the proper route.\n * ⚠️ Routes needs to match the php routes.\n */\nconst baseTitle = document.title\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\t\t{\n\t\t\tpath: '/:index(index.php/)?settings/users',\n\t\t\tcomponent: Users,\n\t\t\tprops: true,\n\t\t\tname: 'users',\n\t\t\tmeta: {\n\t\t\t\ttitle: () => {\n\t\t\t\t\treturn t('settings', 'Active users')\n\t\t\t\t},\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\tpath: ':selectedGroup',\n\t\t\t\t\tname: 'group',\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\ttitle: (to) => {\n\t\t\t\t\t\t\tif (to.params.selectedGroup === 'admin') {\n\t\t\t\t\t\t\t\treturn t('settings', 'Admins')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (to.params.selectedGroup === 'disabled') {\n\t\t\t\t\t\t\t\treturn t('settings', 'Disabled users')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn decodeURIComponent(to.params.selectedGroup)\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tcomponent: Users,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tpath: '/:index(index.php/)?settings/apps',\n\t\t\tcomponent: Apps,\n\t\t\tprops: true,\n\t\t\tname: 'apps',\n\t\t\tmeta: {\n\t\t\t\ttitle: () => {\n\t\t\t\t\treturn t('settings', 'Your apps')\n\t\t\t\t},\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\tpath: ':category',\n\t\t\t\t\tname: 'apps-category',\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\ttitle: async (to) => {\n\t\t\t\t\t\t\tif (to.name === 'apps') {\n\t\t\t\t\t\t\t\treturn t('settings', 'Your apps')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (APPS_SECTION_ENUM[to.params.category]) {\n\t\t\t\t\t\t\t\treturn APPS_SECTION_ENUM[to.params.category]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tawait store.dispatch('getCategories')\n\t\t\t\t\t\t\tconst category = store.getters.getCategoryById(to.params.category)\n\t\t\t\t\t\t\tif (category.displayName) {\n\t\t\t\t\t\t\t\treturn category.displayName\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tcomponent: Apps,\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpath: ':id',\n\t\t\t\t\t\t\tname: 'apps-details',\n\t\t\t\t\t\t\tcomponent: Apps,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n})\n\nrouter.afterEach(async (to) => {\n\tconst metaTitle = await to.meta.title?.(to)\n\tif (metaTitle) {\n\t\tdocument.title = `${metaTitle} - ${baseTitle}`\n\t\tsetPageHeading(metaTitle)\n\t} else {\n\t\tdocument.title = baseTitle\n\t}\n})\n\nexport default router\n","/**\n * @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>\n *\n * @author Joas Schilling <coding@schilljs.com>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport { loadState } from '@nextcloud/initial-state'\n\n/**\n * Set the page heading\n *\n * @param {string} heading page title from the history api\n */\nexport function setPageHeading(heading) {\n\tconst headingEl = document.getElementById('page-heading-level-1')\n\tif (headingEl) {\n\t\theadingEl.textContent = heading\n\t}\n}\nexport default {\n\t/**\n\t * @return {boolean} Whether the user opted-out of shortcuts so that they should not be registered\n\t */\n\tdisableKeyboardShortcuts() {\n\t\treturn loadState('theming', 'shortcutsDisabled', false)\n\t},\n\tsetPageHeading,\n}\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author rakekniven <mark.ziegler@rakekniven.de>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport Vue from 'vue'\nimport VTooltip from 'v-tooltip'\nimport { sync } from 'vuex-router-sync'\n\nimport App from './App.vue'\nimport router from './router'\nimport store from './store'\n\nVue.use(VTooltip, { defaultHtml: false })\n\nsync(store, router)\n\n// CSP config for webpack dynamic chunk loading\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(OC.requestToken)\n\n// bind to window\nVue.prototype.t = t\nVue.prototype.n = n\nVue.prototype.OC = OC\nVue.prototype.OCA = OCA\n// eslint-disable-next-line camelcase\nVue.prototype.oc_userconfig = oc_userconfig\n\nconst app = new Vue({\n\trouter,\n\tstore,\n\trender: h => h(App),\n}).$mount('#content')\n\nexport { app, router, store }\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + {\"7418\":\"settings-apps-view\",\"8351\":\"settings-users\"}[chunkId] + \"-\" + chunkId + \".js?v=\" + {\"7418\":\"4d5d3e469fa54fd1570b\",\"8351\":\"8d867bca10b03f10b1de\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 8562;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t8562: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], function() { return __webpack_require__(9685); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","APPS_SECTION_ENUM","Object","freeze","enabled","t","disabled","updates","featured","name","beforeMount","_c","this","_self","sanitize","url","replace","confirmPassword","options","axios","data","params","getLoggerBuilder","setApp","detectUser","build","orderGroups","groups","orderBy","sort","a","b","usercount","localeCompare","defaults","id","canAdd","canRemove","mutations","appendUsers","state","usersObj","users","concat","keys","map","userid","usersOffset","usersLimit","setPasswordPolicyMinLength","length","minPasswordLength","initGroups","userCount","group","assign","addGroup","gid","displayName","find","push","e","console","error","renameGroup","groupIndex","findIndex","groupSearch","updatedGroup","splice","removeGroup","addUserGroup","user","removeUserGroup","indexOf","addUserSubAdmin","subadmin","removeUserSubAdmin","deleteUser","userIndex","commit","actionType","addUserData","response","ocs","enableDisableUser","updateUserCounts","disabledGroup","forEach","userGroup","warn","logger","setUserData","key","value","humanValue","OC","Util","computerFileSize","resetUsers","CancelToken","searchRequestCancelSource","getters","getUsers","getGroups","getSubadminGroups","filter","getPasswordPolicyMinLength","getUsersOffset","getUsersLimit","getUserCount","actions","context","offset","limit","search","cancel","source","api","generateOcsUrl","encodeURIComponent","cancelToken","token","then","usersCount","catch","limitParam","getUsersFromList","getUsersFromGroup","groupid","groupId","getCapabilities","password_policy","minLength","wipeUserDevices","addUser","dispatch","password","email","quota","language","userStatus","allowedEmpty","Promise","reject","Error","sendWelcomeMail","APPS_API_FAILURE","showError","message","isHTML","initCategories","categories","updateCount","updateCategories","categoriesPromise","gettingCategoriesPromise","setUpdateCount","addCategory","category","appendCategories","categoriesArray","setAllApps","apps","setError","appId","Array","isArray","_id","app","clearError","enableApp","active","disableApp","removable","canUnInstall","uninstallApp","needsDownload","installed","canInstall","updateApp","version","update","resetApps","reset","startLoading","Vue","loading","stopLoading","generateUrl","appIds","_appId","update_required","showInfo","onClick","window","location","reload","close","setTimeout","forceEnableApp","getAllApps","getCategories","shouldRefetchCategories","categoriesPromiseResponse","loadingList","getUpdateCount","getCategoryById","selectedCategoryId","setAppConfig","Vuex","API_FAILURE","meta","Store","modules","settings","serverData","setServerData","getServerData","oc","strict","process","Users","Apps","Router","baseTitle","document","title","router","mode","base","linkActiveClass","routes","path","component","props","children","to","selectedGroup","decodeURIComponent","store","afterEach","metaTitle","heading","headingEl","getElementById","textContent","VTooltip","defaultHtml","sync","__webpack_nonce__","btoa","requestToken","n","OCA","oc_userconfig","render","h","App","$mount","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","loaded","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","every","r","getter","__esModule","d","definition","o","defineProperty","enumerable","get","f","chunkId","all","reduce","promises","u","g","globalThis","Function","obj","prop","prototype","hasOwnProperty","l","done","script","needAttach","scripts","getElementsByTagName","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","bind","type","target","head","appendChild","Symbol","toStringTag","nmd","paths","scriptUrl","importScripts","currentScript","p","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"settings-vue-settings-apps-users-management.js?v=aebb8c1b0a63291749f6","mappings":";6BAAIA,ECAAC,EACAC,0ECwBSC,EAAoBC,OAAOC,OAAO,CAC9CC,SAASC,EAAAA,EAAAA,IAAE,WAAY,eACvBC,UAAUD,EAAAA,EAAAA,IAAE,WAAY,iBACxBE,SAASF,EAAAA,EAAAA,IAAE,WAAY,WACvB,eAAeA,EAAAA,EAAAA,IAAE,WAAY,eAC7BG,UAAUH,EAAAA,EAAAA,IAAE,WAAY,8EC9BiJ,EC2B1K,CACAI,KAAAA,MACAC,YAAAA,WAGA,OADA,uCAEA,oGAEA,GCjBA,GAXgB,cACd,GCRW,WAA+C,OAAOC,EAA5BC,KAAYC,MAAMF,IAAa,cACtE,GACsB,IDSpB,EACA,KACA,KACA,MAI8B,yEEY1BG,YAAW,SAASC,GACzB,OAAOA,EAAIC,QAAQ,MAAO,GAC3B,GAEA,EAiCa,WACX,OAAOC,EAAAA,EAAAA,kBACR,EAnCD,EAoCI,SAAC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EAAQ5F,EAClC,CAEA,IADG0F,GAA4BA,EAA2B5U,GACrDmQ,EAAIL,EAAShO,OAAQqO,IACzBc,EAAUnB,EAASK,GAChBjB,EAAoB0B,EAAEwD,EAAiBnD,IAAYmD,EAAgBnD,IACrEmD,EAAgBnD,GAAS,KAE1BmD,EAAgBnD,GAAW,EAE5B,OAAO/B,EAAoBU,EAAEC,EAC9B,EAEImF,EAAqBd,KAA4B,sBAAIA,KAA4B,uBAAK,GAC1Fc,EAAmB5Q,QAAQuQ,EAAqBvB,KAAK,KAAM,IAC3D4B,EAAmBxS,KAAOmS,EAAqBvB,KAAK,KAAM4B,EAAmBxS,KAAK4Q,KAAK4B,OCvFvF9F,EAAoBsD,QAAKnD,ECGzB,IAAI4F,EAAsB/F,EAAoBU,OAAEP,EAAW,CAAC,OAAO,WAAa,OAAOH,EAAoB,KAAO,IAClH+F,EAAsB/F,EAAoBU,EAAEqF","sources":["webpack:///nextcloud/webpack/runtime/chunk loaded","webpack:///nextcloud/webpack/runtime/load script","webpack:///nextcloud/apps/settings/src/constants/AppsConstants.js","webpack:///nextcloud/apps/settings/src/App.vue?vue&type=script&lang=js&","webpack:///nextcloud/apps/settings/src/App.vue","webpack://nextcloud/./apps/settings/src/App.vue?536c","webpack://nextcloud/./apps/settings/src/App.vue?4d15","webpack:///nextcloud/apps/settings/src/store/api.js","webpack:///nextcloud/apps/settings/src/logger.js","webpack:///nextcloud/apps/settings/src/store/users.js","webpack:///nextcloud/apps/settings/src/store/apps.js","webpack:///nextcloud/apps/settings/src/store/oc.js","webpack:///nextcloud/apps/settings/src/store/index.js","webpack:///nextcloud/apps/settings/src/store/settings.js","webpack:///nextcloud/apps/settings/src/router.js","webpack:///nextcloud/core/src/OCP/accessibility.js","webpack:///nextcloud/apps/settings/src/main-apps-users-management.js","webpack:///nextcloud/webpack/bootstrap","webpack:///nextcloud/webpack/runtime/compat get default export","webpack:///nextcloud/webpack/runtime/define property getters","webpack:///nextcloud/webpack/runtime/ensure chunk","webpack:///nextcloud/webpack/runtime/get javascript chunk filename","webpack:///nextcloud/webpack/runtime/global","webpack:///nextcloud/webpack/runtime/hasOwnProperty shorthand","webpack:///nextcloud/webpack/runtime/make namespace object","webpack:///nextcloud/webpack/runtime/node module decorator","webpack:///nextcloud/webpack/runtime/runtimeId","webpack:///nextcloud/webpack/runtime/publicPath","webpack:///nextcloud/webpack/runtime/jsonp chunk loading","webpack:///nextcloud/webpack/runtime/nonce","webpack:///nextcloud/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"nextcloud:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = function(url, done, key, chunkId) {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = function(prev, event) {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach(function(fn) { return fn(event); });\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","/**\n * @copyright 2022, Julia Kirschenheuter <julia.kirschenheuter@nextcloud.com>\n *\n * @author Julia Kirschenheuter <julia.kirschenheuter@nextcloud.com>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport { translate as t } from '@nextcloud/l10n'\n\n/** Enum of verification constants, according to Apps */\nexport const APPS_SECTION_ENUM = Object.freeze({\n\tenabled: t('settings', 'Active apps'),\n\tdisabled: t('settings', 'Disabled apps'),\n\tupdates: t('settings', 'Updates'),\n\t'app-bundles': t('settings', 'App bundles'),\n\tfeatured: t('settings', 'Featured apps'),\n})\n","import mod from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","<!--\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  -->\n\n<template>\n\t<router-view />\n</template>\n\n<script>\nexport default {\n\tname: 'App',\n\tbeforeMount() {\n\t\t// importing server data into the store\n\t\tconst serverDataElmt = document.getElementById('serverData')\n\t\tif (serverDataElmt !== null) {\n\t\t\tthis.$store.commit('setServerData', JSON.parse(document.getElementById('serverData').dataset.server))\n\t\t}\n\t},\n}\n</script>\n","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=50420604&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n  script,\n  render,\n  staticRenderFns,\n  false,\n  null,\n  null,\n  null\n  \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('router-view')\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n * @author Sujith Haridasan <sujith.h@gmail.com>\n *\n * @license AGPL-3.0-or-later\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 */\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 * @copyright 2020 Christoph Wurst <christoph@winzerhof-wurst.at>\n *\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport { getLoggerBuilder } from '@nextcloud/logger'\n\nexport default getLoggerBuilder()\n\t.setApp('settings')\n\t.detectUser()\n\t.build()\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author Arthur Schiwon <blizzz@arthur-schiwon.de>\n * @author Christoph Wurst <christoph@winzerhof-wurst.at>\n * @author Daniel Calviño Sánchez <danxuliu@gmail.com>\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n * @author Vincent Petry <vincent@nextcloud.com>\n * @author Stephan Orbaugh <stephan.orbaugh@nextcloud.com>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport api from './api'\nimport axios from '@nextcloud/axios'\nimport { generateOcsUrl } from '@nextcloud/router'\nimport logger from '../logger'\n\nconst orderGroups = function(groups, orderBy) {\n\t/* const SORT_USERCOUNT = 1;\n\t * const SORT_GROUPNAME = 2;\n\t * https://github.com/nextcloud/server/blob/208e38e84e1a07a49699aa90dc5b7272d24489f0/lib/private/Group/MetaData.php#L34\n\t */\n\tif (orderBy === 1) {\n\t\treturn groups.sort((a, b) => a.usercount - a.disabled < b.usercount - b.disabled)\n\t} else {\n\t\treturn groups.sort((a, b) => a.name.localeCompare(b.name))\n\t}\n}\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: 1,\n\tminPasswordLength: 0,\n\tusersOffset: 0,\n\tusersLimit: 25,\n\tuserCount: 0,\n}\n\nconst mutations = {\n\tappendUsers(state, usersObj) {\n\t\t// convert obj to array\n\t\tconst users = state.users.concat(Object.keys(usersObj).map(userid => usersObj[userid]))\n\t\tstate.usersOffset += state.usersLimit\n\t\tstate.users = users\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\tstate.groups = orderGroups(state.groups, state.orderBy)\n\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.push(group)\n\t\t\tstate.groups = orderGroups(state.groups, state.orderBy)\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\tstate.groups = orderGroups(state.groups, state.orderBy)\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\tstate.groups = orderGroups(state.groups, state.orderBy)\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\tstate.groups = orderGroups(state.groups, state.orderBy)\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.push(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\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 = OC.Util.computerFileSize(value)\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},\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\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\tgetUserCount(state) {\n\t\treturn state.userCount\n\t},\n}\n\nconst CancelToken = axios.CancelToken\nlet searchRequestCancelSource = null\n\nconst actions = {\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\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 (OC.getCapabilities().password_policy && OC.getCapabilities().password_policy.minLength) {\n\t\t\tcontext.commit('setPasswordPolicyMinLength', OC.getCapabilities().password_policy.minLength)\n\t\t\treturn OC.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 * @return {Promise}\n\t */\n\taddUser({ commit, dispatch }, { userid, password, displayName, email, groups, subadmin, quota, language }) {\n\t\treturn api.requireAdmin().then((response) => {\n\t\t\treturn api.post(generateOcsUrl('cloud/users'), { userid, password, displayName, email, groups, subadmin, quota, language })\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']\n\t\tif (['email', 'language', 'quota', 'displayname', 'password'].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 * @copyright Copyright (c) 2018 Julius Härtl <jus@bitgrid.net>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport api from './api'\nimport Vue from 'vue'\nimport { generateUrl } from '@nextcloud/router'\nimport { showError, showInfo } from '@nextcloud/dialogs'\nimport '@nextcloud/dialogs/dist/index.css'\n\nconst state = {\n\tapps: [],\n\tcategories: [],\n\tupdateCount: 0,\n\tloading: {},\n\tloadingList: false,\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\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\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\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}\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\t// TODO: find a cleaner solution\n\t\t\t\t\tlocation.reload()\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\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 * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport api from './api'\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 * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport Vue from 'vue'\nimport Vuex, { Store } from 'vuex'\nimport users from './users'\nimport apps from './apps'\nimport settings from './settings'\nimport oc from './oc'\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\nexport default new Store({\n\tmodules: {\n\t\tusers,\n\t\tapps,\n\t\tsettings,\n\t\toc,\n\t},\n\tstrict: debug,\n\n\tmutations,\n})\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\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 */\n\nconst state = {\n\tserverData: {},\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 * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author Julius Härtl <jus@bitgrid.net>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport Vue from 'vue'\nimport Router from 'vue-router'\nimport { generateUrl } from '@nextcloud/router'\nimport { APPS_SECTION_ENUM } from './constants/AppsConstants.js'\nimport store from './store/index.js'\nimport { setPageHeading } from '../../../core/src/OCP/accessibility.js'\n\n// Dynamic loading\nconst Users = () => import(/* webpackChunkName: 'settings-users' */'./views/Users')\nconst Apps = () => import(/* webpackChunkName: 'settings-apps-view' */'./views/Apps')\n\nVue.use(Router)\n\n/*\n * This is the list of routes where the vuejs app will\n * take over php to provide data\n * You need to forward the php routing (routes.php) to\n * the settings-vue template, where the vue-router will\n * ensure the proper route.\n * ⚠️ Routes needs to match the php routes.\n */\nconst baseTitle = document.title\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\t\t{\n\t\t\tpath: '/:index(index.php/)?settings/users',\n\t\t\tcomponent: Users,\n\t\t\tprops: true,\n\t\t\tname: 'users',\n\t\t\tmeta: {\n\t\t\t\ttitle: () => {\n\t\t\t\t\treturn t('settings', 'Active users')\n\t\t\t\t},\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\tpath: ':selectedGroup',\n\t\t\t\t\tname: 'group',\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\ttitle: (to) => {\n\t\t\t\t\t\t\tif (to.params.selectedGroup === 'admin') {\n\t\t\t\t\t\t\t\treturn t('settings', 'Admins')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (to.params.selectedGroup === 'disabled') {\n\t\t\t\t\t\t\t\treturn t('settings', 'Disabled users')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn decodeURIComponent(to.params.selectedGroup)\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tcomponent: Users,\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t\t{\n\t\t\tpath: '/:index(index.php/)?settings/apps',\n\t\t\tcomponent: Apps,\n\t\t\tprops: true,\n\t\t\tname: 'apps',\n\t\t\tmeta: {\n\t\t\t\ttitle: () => {\n\t\t\t\t\treturn t('settings', 'Your apps')\n\t\t\t\t},\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\tpath: ':category',\n\t\t\t\t\tname: 'apps-category',\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\ttitle: async (to) => {\n\t\t\t\t\t\t\tif (to.name === 'apps') {\n\t\t\t\t\t\t\t\treturn t('settings', 'Your apps')\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (APPS_SECTION_ENUM[to.params.category]) {\n\t\t\t\t\t\t\t\treturn APPS_SECTION_ENUM[to.params.category]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tawait store.dispatch('getCategories')\n\t\t\t\t\t\t\tconst category = store.getters.getCategoryById(to.params.category)\n\t\t\t\t\t\t\tif (category.displayName) {\n\t\t\t\t\t\t\t\treturn category.displayName\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\tcomponent: Apps,\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpath: ':id',\n\t\t\t\t\t\t\tname: 'apps-details',\n\t\t\t\t\t\t\tcomponent: Apps,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t},\n\t\t\t],\n\t\t},\n\t],\n})\n\nrouter.afterEach(async (to) => {\n\tconst metaTitle = await to.meta.title?.(to)\n\tif (metaTitle) {\n\t\tdocument.title = `${metaTitle} - ${baseTitle}`\n\t\tsetPageHeading(metaTitle)\n\t} else {\n\t\tdocument.title = baseTitle\n\t}\n})\n\nexport default router\n","/**\n * @copyright Copyright (c) 2022 Joas Schilling <coding@schilljs.com>\n *\n * @author Joas Schilling <coding@schilljs.com>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport { loadState } from '@nextcloud/initial-state'\n\n/**\n * Set the page heading\n *\n * @param {string} heading page title from the history api\n */\nexport function setPageHeading(heading) {\n\tconst headingEl = document.getElementById('page-heading-level-1')\n\tif (headingEl) {\n\t\theadingEl.textContent = heading\n\t}\n}\nexport default {\n\t/**\n\t * @return {boolean} Whether the user opted-out of shortcuts so that they should not be registered\n\t */\n\tdisableKeyboardShortcuts() {\n\t\treturn loadState('theming', 'shortcutsDisabled', false)\n\t},\n\tsetPageHeading,\n}\n","/**\n * @copyright Copyright (c) 2018 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n * @author rakekniven <mark.ziegler@rakekniven.de>\n * @author Roeland Jago Douma <roeland@famdouma.nl>\n *\n * @license AGPL-3.0-or-later\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 */\n\nimport Vue from 'vue'\nimport VTooltip from 'v-tooltip'\nimport { sync } from 'vuex-router-sync'\n\nimport App from './App.vue'\nimport router from './router'\nimport store from './store'\n\nVue.use(VTooltip, { defaultHtml: false })\n\nsync(store, router)\n\n// CSP config for webpack dynamic chunk loading\n// eslint-disable-next-line camelcase\n__webpack_nonce__ = btoa(OC.requestToken)\n\n// bind to window\nVue.prototype.t = t\nVue.prototype.n = n\nVue.prototype.OC = OC\nVue.prototype.OCA = OCA\n// eslint-disable-next-line camelcase\nVue.prototype.oc_userconfig = oc_userconfig\n\nconst app = new Vue({\n\trouter,\n\tstore,\n\trender: h => h(App),\n}).$mount('#content')\n\nexport { app, router, store }\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = function(chunkId) {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce(function(promises, key) {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = function(chunkId) {\n\t// return url for filenames based on template\n\treturn \"\" + {\"7418\":\"settings-apps-view\",\"8351\":\"settings-users\"}[chunkId] + \"-\" + chunkId + \".js?v=\" + {\"7418\":\"4d5d3e469fa54fd1570b\",\"8351\":\"8d867bca10b03f10b1de\"}[chunkId] + \"\";\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = function(module) {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.j = 8562;","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t8562: 0\n};\n\n__webpack_require__.f.j = function(chunkId, promises) {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise(function(resolve, reject) { installedChunkData = installedChunks[chunkId] = [resolve, reject]; });\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = function(event) {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t} else installedChunks[chunkId] = 0;\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunknextcloud\"] = self[\"webpackChunknextcloud\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [7874], function() { return __webpack_require__(9685); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","inProgress","dataWebpackPrefix","APPS_SECTION_ENUM","Object","freeze","enabled","t","disabled","updates","featured","name","beforeMount","_c","this","_self","sanitize","url","replace","confirmPassword","options","axios","data","params","getLoggerBuilder","setApp","detectUser","build","orderGroups","groups","orderBy","sort","a","b","usercount","localeCompare","defaults","id","canAdd","canRemove","mutations","appendUsers","state","usersObj","users","concat","keys","map","userid","usersOffset","usersLimit","setPasswordPolicyMinLength","length","minPasswordLength","initGroups","userCount","group","assign","addGroup","gid","displayName","find","push","e","console","error","renameGroup","groupIndex","findIndex","groupSearch","updatedGroup","splice","removeGroup","addUserGroup","user","removeUserGroup","indexOf","addUserSubAdmin","subadmin","removeUserSubAdmin","deleteUser","userIndex","commit","actionType","addUserData","response","ocs","enableDisableUser","updateUserCounts","disabledGroup","forEach","userGroup","warn","logger","setUserData","key","value","humanValue","OC","Util","computerFileSize","resetUsers","CancelToken","searchRequestCancelSource","getters","getUsers","getGroups","getSubadminGroups","filter","getPasswordPolicyMinLength","getUsersOffset","getUsersLimit","getUserCount","actions","context","offset","limit","search","cancel","source","trim","api","generateOcsUrl","encodeURIComponent","cancelToken","token","then","usersCount","catch","limitParam","getUsersFromList","getUsersFromGroup","groupid","groupId","getCapabilities","password_policy","minLength","wipeUserDevices","addUser","dispatch","password","email","quota","language","userStatus","allowedEmpty","Promise","reject","Error","sendWelcomeMail","APPS_API_FAILURE","showError","message","isHTML","initCategories","categories","updateCount","updateCategories","categoriesPromise","gettingCategoriesPromise","setUpdateCount","addCategory","category","appendCategories","categoriesArray","setAllApps","apps","setError","appId","Array","isArray","_id","app","clearError","enableApp","active","disableApp","removable","canUnInstall","uninstallApp","needsDownload","installed","canInstall","updateApp","version","update","resetApps","reset","startLoading","Vue","loading","stopLoading","generateUrl","appIds","_appId","update_required","showInfo","onClick","window","location","reload","close","setTimeout","forceEnableApp","getAllApps","getCategories","shouldRefetchCategories","categoriesPromiseResponse","loadingList","getUpdateCount","getCategoryById","selectedCategoryId","setAppConfig","Vuex","API_FAILURE","meta","Store","modules","settings","serverData","setServerData","getServerData","oc","strict","process","Users","Apps","Router","baseTitle","document","title","router","mode","base","linkActiveClass","routes","path","component","props","children","to","selectedGroup","decodeURIComponent","store","afterEach","metaTitle","heading","headingEl","getElementById","textContent","VTooltip","defaultHtml","sync","__webpack_nonce__","btoa","requestToken","n","OCA","oc_userconfig","render","h","App","$mount","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","loaded","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","every","r","getter","__esModule","d","definition","o","defineProperty","enumerable","get","f","chunkId","all","reduce","promises","u","g","globalThis","Function","obj","prop","prototype","hasOwnProperty","l","done","script","needAttach","scripts","getElementsByTagName","s","getAttribute","createElement","charset","timeout","nc","setAttribute","src","onScriptComplete","prev","event","onerror","onload","clearTimeout","doneFns","parentNode","removeChild","bind","type","target","head","appendChild","Symbol","toStringTag","nmd","paths","scriptUrl","importScripts","currentScript","p","baseURI","self","href","installedChunks","installedChunkData","promise","resolve","errorType","realSrc","request","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file