diff --git a/plugins/UsersManager/Controller.php b/plugins/UsersManager/Controller.php index 1a28c5af39f..0fddf4b61d8 100644 --- a/plugins/UsersManager/Controller.php +++ b/plugins/UsersManager/Controller.php @@ -384,13 +384,13 @@ public function addNewToken() Nonce::checkNonce(self::NONCE_ADD_AUTH_TOKEN); $description = \Piwik\Request::fromRequest()->getStringParameter('description', ''); - $postOnly = \Piwik\Request::fromRequest()->getBoolParameter('secure_only', false); + $secureOnly = \Piwik\Request::fromRequest()->getBoolParameter('secure_only', false); $login = Piwik::getCurrentUserLogin(); $generatedToken = $this->userModel->generateRandomTokenAuth(); - $this->userModel->addTokenAuth($login, $generatedToken, $description, Date::now()->getDatetime(), null, false, $postOnly); + $this->userModel->addTokenAuth($login, $generatedToken, $description, Date::now()->getDatetime(), null, false, $secureOnly); $container = StaticContainer::getContainer(); $email = $container->make(TokenAuthCreatedEmail::class, [ diff --git a/plugins/UsersManager/UsersManager.php b/plugins/UsersManager/UsersManager.php index 74b27380d87..472a94f9c82 100644 --- a/plugins/UsersManager/UsersManager.php +++ b/plugins/UsersManager/UsersManager.php @@ -356,8 +356,7 @@ public function getClientSideTranslationKeys(&$translationKeys) $translationKeys[] = 'UsersManager_PrivAdmin'; $translationKeys[] = 'UsersManager_PrivNone'; $translationKeys[] = 'UsersManager_PrivView'; - $translationKeys[] = 'UsersManager_OnlyAllowPostRequests'; - $translationKeys[] = 'UsersManager_PostOnly'; + $translationKeys[] = 'UsersManager_OnlyAllowSecureRequests'; $translationKeys[] = 'UsersManager_RemovePermissions'; $translationKeys[] = 'UsersManager_RemoveSuperuserAccessConfirm'; $translationKeys[] = 'UsersManager_RemoveUserAccess'; @@ -372,6 +371,7 @@ public function getClientSideTranslationKeys(&$translationKeys) $translationKeys[] = 'UsersManager_RoleFor'; $translationKeys[] = 'UsersManager_RolesHelp'; $translationKeys[] = 'UsersManager_SaveBasicInfo'; + $translationKeys[] = 'UsersManager_SecureOnly'; $translationKeys[] = 'UsersManager_SendInvite'; $translationKeys[] = 'UsersManager_SetPermission'; $translationKeys[] = 'UsersManager_Status'; diff --git a/plugins/UsersManager/lang/en.json b/plugins/UsersManager/lang/en.json index bef00863502..94d360c4c52 100644 --- a/plugins/UsersManager/lang/en.json +++ b/plugins/UsersManager/lang/en.json @@ -220,7 +220,7 @@ "CopyDeniedHints": "Please try again by either switching browsers or copying and sharing this link directly instead: %1$s", "AuthTokenSecureOnlyHelp": "Enable this option to only allow this token to be used in a secure way (e.g. POST requests), this is recommended as a best security practice. The token will then not be valid as a URL parameter in GET requests.", "AuthTokenSecureOnlyHelpForced": "The system administrator has configured Matomo to only allow tokens to be created for use in secure way (e.g. via POST requests), you cannot change this token option.", - "OnlyAllowPostRequests": "Only allow POST requests", - "PostOnly": "POST only" + "OnlyAllowSecureRequests": "Only allow secure requests", + "SecureOnly": "Secure only" } } diff --git a/plugins/UsersManager/templates/addNewToken.twig b/plugins/UsersManager/templates/addNewToken.twig index 7a8868743c3..4495c253e06 100644 --- a/plugins/UsersManager/templates/addNewToken.twig +++ b/plugins/UsersManager/templates/addNewToken.twig @@ -8,7 +8,7 @@ vue-entry="UsersManager.AddNewToken" no-description="{{ noDescription|json_encode }}" form-nonce="{{ nonce|json_encode }}" - force-post-only="{{ forcePostOnly|json_encode }}" + force-secure-only="{{ forceSecureOnly|json_encode }}" > {% endblock %} diff --git a/plugins/UsersManager/vue/dist/UsersManager.umd.js b/plugins/UsersManager/vue/dist/UsersManager.umd.js index 53652e81f49..5c0502707e6 100644 --- a/plugins/UsersManager/vue/dist/UsersManager.umd.js +++ b/plugins/UsersManager/vue/dist/UsersManager.umd.js @@ -3842,20 +3842,20 @@ function PersonalSettingsvue_type_template_id_292244fe_render(_ctx, _cache, $pro PersonalSettingsvue_type_script_lang_ts.render = PersonalSettingsvue_type_template_id_292244fe_render /* harmony default export */ var PersonalSettings = (PersonalSettingsvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/AddNewToken/AddNewToken.vue?vue&type=template&id=be7e4f10 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/AddNewToken/AddNewToken.vue?vue&type=template&id=44efbd13 -var AddNewTokenvue_type_template_id_be7e4f10_hoisted_1 = { +var AddNewTokenvue_type_template_id_44efbd13_hoisted_1 = { key: 0 }; -var AddNewTokenvue_type_template_id_be7e4f10_hoisted_2 = { +var AddNewTokenvue_type_template_id_44efbd13_hoisted_2 = { key: 1, class: "alert alert-danger" }; -var AddNewTokenvue_type_template_id_be7e4f10_hoisted_3 = ["action"]; -var AddNewTokenvue_type_template_id_be7e4f10_hoisted_4 = ["value"]; -var AddNewTokenvue_type_template_id_be7e4f10_hoisted_5 = ["value"]; -var AddNewTokenvue_type_template_id_be7e4f10_hoisted_6 = ["innerHTML"]; -function AddNewTokenvue_type_template_id_be7e4f10_render(_ctx, _cache, $props, $setup, $data, $options) { +var AddNewTokenvue_type_template_id_44efbd13_hoisted_3 = ["action"]; +var AddNewTokenvue_type_template_id_44efbd13_hoisted_4 = ["value"]; +var AddNewTokenvue_type_template_id_44efbd13_hoisted_5 = ["value"]; +var AddNewTokenvue_type_template_id_44efbd13_hoisted_6 = ["innerHTML"]; +function AddNewTokenvue_type_template_id_44efbd13_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); @@ -3864,7 +3864,7 @@ function AddNewTokenvue_type_template_id_be7e4f10_render(_ctx, _cache, $props, $ "content-title": _ctx.translate('UsersManager_AuthTokens') }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_TokenAuthIntro')), 1), _ctx.noDescription ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("br", AddNewTokenvue_type_template_id_be7e4f10_hoisted_1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.noDescription ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", AddNewTokenvue_type_template_id_be7e4f10_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')) + ": " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ValidatorErrorEmptyValue')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("form", { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_TokenAuthIntro')), 1), _ctx.noDescription ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("br", AddNewTokenvue_type_template_id_44efbd13_hoisted_1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.noDescription ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", AddNewTokenvue_type_template_id_44efbd13_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')) + ": " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_ValidatorErrorEmptyValue')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("form", { action: _ctx.addNewTokenFormUrl, method: "post", class: "addTokenForm" @@ -3882,33 +3882,33 @@ function AddNewTokenvue_type_template_id_be7e4f10_render(_ctx, _cache, $props, $ }, null, 8, ["title", "inline-help", "modelValue"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "checkbox", name: "secure_only", - title: _ctx.translate('UsersManager_OnlyAllowPostRequests'), + title: _ctx.translate('UsersManager_OnlyAllowSecureRequests'), required: false, - "inline-help": _ctx.postOnlyHelp, - modelValue: _ctx.tokenPostOnly, + "inline-help": _ctx.secureOnlyHelp, + modelValue: _ctx.tokenSecureOnly, "onUpdate:modelValue": _cache[1] || (_cache[1] = function ($event) { - return _ctx.tokenPostOnly = $event; + return _ctx.tokenSecureOnly = $event; }), - disabled: _ctx.forcePostOnlyCalc + disabled: _ctx.forceSecureOnlyCalc }, null, 8, ["title", "inline-help", "modelValue", "disabled"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "hidden", value: _ctx.formNonce, name: "nonce" - }, null, 8, AddNewTokenvue_type_template_id_be7e4f10_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, AddNewTokenvue_type_template_id_44efbd13_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "submit", value: _ctx.translate('UsersManager_CreateNewToken'), class: "btn", style: { "margin-right": "3.5px" } - }, null, 8, AddNewTokenvue_type_template_id_be7e4f10_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, null, 8, AddNewTokenvue_type_template_id_44efbd13_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { innerHTML: _ctx.$sanitize(_ctx.cancelLink) - }, null, 8, AddNewTokenvue_type_template_id_be7e4f10_hoisted_6)], 8, AddNewTokenvue_type_template_id_be7e4f10_hoisted_3)]; + }, null, 8, AddNewTokenvue_type_template_id_44efbd13_hoisted_6)], 8, AddNewTokenvue_type_template_id_44efbd13_hoisted_3)]; }), _: 1 }, 8, ["content-title"]); } -// CONCATENATED MODULE: ./plugins/UsersManager/vue/src/AddNewToken/AddNewToken.vue?vue&type=template&id=be7e4f10 +// CONCATENATED MODULE: ./plugins/UsersManager/vue/src/AddNewToken/AddNewToken.vue?vue&type=template&id=44efbd13 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/AddNewToken/AddNewToken.vue?vue&type=script&lang=ts @@ -3918,7 +3918,7 @@ function AddNewTokenvue_type_template_id_be7e4f10_render(_ctx, _cache, $props, $ props: { formNonce: String, noDescription: Boolean, - forcePostOnly: Boolean + forceSecureOnly: Boolean }, components: { ContentBlock: external_CoreHome_["ContentBlock"], @@ -3927,7 +3927,7 @@ function AddNewTokenvue_type_template_id_be7e4f10_render(_ctx, _cache, $props, $ data: function data() { return { tokenDescription: '', - tokenPostOnly: true + tokenSecureOnly: true }; }, computed: { @@ -3944,11 +3944,11 @@ function AddNewTokenvue_type_template_id_be7e4f10_render(_ctx, _cache, $props, $ }))); return Object(external_CoreHome_["translate"])('General_OrCancel', ""), ''); }, - forcePostOnlyCalc: function forcePostOnlyCalc() { - return this.forcePostOnly; + forceSecureOnlyCalc: function forceSecureOnlyCalc() { + return this.forceSecureOnly; }, - postOnlyHelp: function postOnlyHelp() { - return this.forcePostOnly ? Object(external_CoreHome_["translate"])('UsersManager_AuthTokenSecureOnlyHelpForced') : Object(external_CoreHome_["translate"])('UsersManager_AuthTokenSecureOnlyHelp'); + secureOnlyHelp: function secureOnlyHelp() { + return this.forceSecureOnly ? Object(external_CoreHome_["translate"])('UsersManager_AuthTokenSecureOnlyHelpForced') : Object(external_CoreHome_["translate"])('UsersManager_AuthTokenSecureOnlyHelp'); } } })); @@ -3958,7 +3958,7 @@ function AddNewTokenvue_type_template_id_be7e4f10_render(_ctx, _cache, $props, $ -AddNewTokenvue_type_script_lang_ts.render = AddNewTokenvue_type_template_id_be7e4f10_render +AddNewTokenvue_type_script_lang_ts.render = AddNewTokenvue_type_template_id_44efbd13_render /* harmony default export */ var AddNewToken = (AddNewTokenvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/AddNewToken/AddNewTokenSuccess.vue?vue&type=template&id=2a321a6d @@ -4029,86 +4029,86 @@ function AddNewTokenSuccessvue_type_template_id_2a321a6d_render(_ctx, _cache, $p AddNewTokenSuccessvue_type_script_lang_ts.render = AddNewTokenSuccessvue_type_template_id_2a321a6d_render /* harmony default export */ var AddNewTokenSuccess = (AddNewTokenSuccessvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/UserSecurity/UserSecurity.vue?vue&type=template&id=8def157e +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/UserSecurity/UserSecurity.vue?vue&type=template&id=03cd1dd8 -var UserSecurityvue_type_template_id_8def157e_hoisted_1 = ["action"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_2 = ["value"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_3 = { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_1 = ["action"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_2 = ["value"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_3 = { key: 0 }; -var UserSecurityvue_type_template_id_8def157e_hoisted_4 = { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_4 = { class: "alert alert-info" }; -var UserSecurityvue_type_template_id_8def157e_hoisted_5 = ["value"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_6 = { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_5 = ["value"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_6 = { key: 1 }; -var UserSecurityvue_type_template_id_8def157e_hoisted_7 = { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_7 = { class: "alert alert-danger" }; -var UserSecurityvue_type_template_id_8def157e_hoisted_8 = ["innerHTML"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_9 = { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_8 = ["innerHTML"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_9 = { ref: "afterPassword" }; -var UserSecurityvue_type_template_id_8def157e_hoisted_10 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_10 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { name: "authtokens", id: "authtokens" }, null, -1); -var UserSecurityvue_type_template_id_8def157e_hoisted_11 = { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_11 = { key: 0 }; -var UserSecurityvue_type_template_id_8def157e_hoisted_12 = { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_12 = { class: "listAuthTokens" }; -var UserSecurityvue_type_template_id_8def157e_hoisted_13 = ["title"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_14 = { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_13 = ["title"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_14 = { key: 0 }; -var UserSecurityvue_type_template_id_8def157e_hoisted_15 = ["colspan", "innerHTML"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_16 = { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_15 = ["colspan", "innerHTML"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_16 = { class: "creationDate" }; -var UserSecurityvue_type_template_id_8def157e_hoisted_17 = ["title"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_18 = ["action"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_19 = ["value"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_20 = ["value"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_21 = ["title"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_17 = ["title"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_18 = ["action"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_19 = ["value"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_20 = ["value"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_21 = ["title"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_22 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_22 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-delete" }, null, -1); -var UserSecurityvue_type_template_id_8def157e_hoisted_23 = [UserSecurityvue_type_template_id_8def157e_hoisted_22]; -var UserSecurityvue_type_template_id_8def157e_hoisted_24 = { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_23 = [UserSecurityvue_type_template_id_03cd1dd8_hoisted_22]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_24 = { class: "tableActionBar" }; -var UserSecurityvue_type_template_id_8def157e_hoisted_25 = ["href"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_25 = ["href"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_26 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_26 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-add" }, null, -1); -var UserSecurityvue_type_template_id_8def157e_hoisted_27 = ["action"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_28 = ["value"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_27 = ["action"]; +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_28 = ["value"]; -var UserSecurityvue_type_template_id_8def157e_hoisted_29 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_29 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { name: "idtokenauth", type: "hidden", value: "all" }, null, -1); -var UserSecurityvue_type_template_id_8def157e_hoisted_30 = { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_30 = { type: "submit", class: "table-action" }; -var UserSecurityvue_type_template_id_8def157e_hoisted_31 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var UserSecurityvue_type_template_id_03cd1dd8_hoisted_31 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-delete" }, null, -1); -function UserSecurityvue_type_template_id_8def157e_render(_ctx, _cache, $props, $setup, $data, $options) { +function UserSecurityvue_type_template_id_03cd1dd8_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); @@ -4129,7 +4129,7 @@ function UserSecurityvue_type_template_id_8def157e_render(_ctx, _cache, $props, type: "hidden", value: _ctx.changePasswordNonce, name: "nonce" - }, null, 8, UserSecurityvue_type_template_id_8def157e_hoisted_2), _ctx.isValidHost ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserSecurityvue_type_template_id_8def157e_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, UserSecurityvue_type_template_id_03cd1dd8_hoisted_2), _ctx.isValidHost ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserSecurityvue_type_template_id_03cd1dd8_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "password", name: "password", autocomplete: false, @@ -4159,37 +4159,37 @@ function UserSecurityvue_type_template_id_8def157e_render(_ctx, _cache, $props, }), title: _ctx.translate('UsersManager_YourCurrentPassword'), "inline-help": _ctx.translate('UsersManager_TypeYourCurrentPassword') - }, null, 8, ["modelValue", "title", "inline-help"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserSecurityvue_type_template_id_8def157e_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_PasswordChangeTerminatesOtherSessions')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, ["modelValue", "title", "inline-help"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserSecurityvue_type_template_id_03cd1dd8_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_PasswordChangeTerminatesOtherSessions')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { type: "submit", value: _ctx.translate('General_Save'), class: "btn" - }, null, 8, UserSecurityvue_type_template_id_8def157e_hoisted_5)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.isValidHost ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserSecurityvue_type_template_id_8def157e_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserSecurityvue_type_template_id_8def157e_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_InjectedHostCannotChangePwd', _ctx.invalidHost)) + " ", 1), !_ctx.isSuperUser ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + }, null, 8, UserSecurityvue_type_template_id_03cd1dd8_hoisted_5)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.isValidHost ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserSecurityvue_type_template_id_03cd1dd8_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserSecurityvue_type_template_id_03cd1dd8_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_InjectedHostCannotChangePwd', _ctx.invalidHost)) + " ", 1), !_ctx.isSuperUser ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { key: 0, innerHTML: _ctx.$sanitize(_ctx.emailYourAdminText) - }, null, 8, UserSecurityvue_type_template_id_8def157e_hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, UserSecurityvue_type_template_id_8def157e_hoisted_1)]; + }, null, 8, UserSecurityvue_type_template_id_03cd1dd8_hoisted_8)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 8, UserSecurityvue_type_template_id_03cd1dd8_hoisted_1)]; }), _: 1 - }, 8, ["content-title"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserSecurityvue_type_template_id_8def157e_hoisted_9, [_ctx.isUsersAdminEnabled && _ctx.afterPasswordComponent ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDynamicComponent"])(_ctx.afterPasswordComponent), { + }, 8, ["content-title"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserSecurityvue_type_template_id_03cd1dd8_hoisted_9, [_ctx.isUsersAdminEnabled && _ctx.afterPasswordComponent ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDynamicComponent"])(_ctx.afterPasswordComponent), { key: 0 - })) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512), UserSecurityvue_type_template_id_8def157e_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { + })) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512), UserSecurityvue_type_template_id_03cd1dd8_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { "content-title": _ctx.translate('UsersManager_AuthTokens') }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { var _ctx$tokens, _ctx$tokens2; - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_TokenAuthIntro')) + " ", 1), _ctx.hasTokensWithExpireDate ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", UserSecurityvue_type_template_id_8def157e_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ExpiredTokensDeleteAutomatically')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", UserSecurityvue_type_template_id_8def157e_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_CreationDate')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_LastUsed')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_PostOnly')), 1), _ctx.hasTokensWithExpireDate ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("th", { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_TokenAuthIntro')) + " ", 1), _ctx.hasTokensWithExpireDate ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", UserSecurityvue_type_template_id_03cd1dd8_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ExpiredTokensDeleteAutomatically')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", UserSecurityvue_type_template_id_03cd1dd8_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_CreationDate')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_LastUsed')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_SecureOnly')), 1), _ctx.hasTokensWithExpireDate ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("th", { key: 0, title: _ctx.translate('UsersManager_TokensWithExpireDateCreationBySystem') - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ExpireDate')), 9, UserSecurityvue_type_template_id_8def157e_hoisted_13)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [!((_ctx$tokens = _ctx.tokens) !== null && _ctx$tokens !== void 0 && _ctx$tokens.length) ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", UserSecurityvue_type_template_id_8def157e_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ExpireDate')), 9, UserSecurityvue_type_template_id_03cd1dd8_hoisted_13)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [!((_ctx$tokens = _ctx.tokens) !== null && _ctx$tokens !== void 0 && _ctx$tokens.length) ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", UserSecurityvue_type_template_id_03cd1dd8_hoisted_14, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { colspan: _ctx.hasTokensWithExpireDate ? 5 : 4, innerHTML: _ctx.$sanitize(_ctx.noTokenCreatedYetText) - }, null, 8, UserSecurityvue_type_template_id_8def157e_hoisted_15)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.tokens || [], function (theToken) { + }, null, 8, UserSecurityvue_type_template_id_03cd1dd8_hoisted_15)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.tokens || [], function (theToken) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("tr", { key: theToken.idusertokenauth - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", UserSecurityvue_type_template_id_8def157e_hoisted_16, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(theToken.date_created), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(theToken.description), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(theToken.last_used ? theToken.last_used : _ctx.translate('General_Never')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(parseInt(theToken.secure_only, 10) === 1 ? _ctx.translate('General_Yes') : _ctx.translate('General_No')), 1), _ctx.hasTokensWithExpireDate ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", UserSecurityvue_type_template_id_03cd1dd8_hoisted_16, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(theToken.date_created), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(theToken.description), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(theToken.last_used ? theToken.last_used : _ctx.translate('General_Never')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(parseInt(theToken.secure_only, 10) === 1 ? _ctx.translate('General_Yes') : _ctx.translate('General_No')), 1), _ctx.hasTokensWithExpireDate ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("td", { key: 0, title: _ctx.translate('UsersManager_TokensWithExpireDateCreationBySystem') - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(theToken.date_expired ? theToken.date_expired : _ctx.translate('General_Never')), 9, UserSecurityvue_type_template_id_8def157e_hoisted_17)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("form", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(theToken.date_expired ? theToken.date_expired : _ctx.translate('General_Never')), 9, UserSecurityvue_type_template_id_03cd1dd8_hoisted_17)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("form", { method: "post", action: _ctx.deleteTokenAction, style: { @@ -4199,19 +4199,19 @@ function UserSecurityvue_type_template_id_8def157e_render(_ctx, _cache, $props, name: "nonce", type: "hidden", value: _ctx.deleteTokenNonce - }, null, 8, UserSecurityvue_type_template_id_8def157e_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, UserSecurityvue_type_template_id_03cd1dd8_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { name: "idtokenauth", type: "hidden", value: theToken.idusertokenauth - }, null, 8, UserSecurityvue_type_template_id_8def157e_hoisted_20), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("button", { + }, null, 8, UserSecurityvue_type_template_id_03cd1dd8_hoisted_20), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("button", { type: "submit", class: "table-action", title: _ctx.translate('General_Delete') - }, UserSecurityvue_type_template_id_8def157e_hoisted_23, 8, UserSecurityvue_type_template_id_8def157e_hoisted_21)], 8, UserSecurityvue_type_template_id_8def157e_hoisted_18)])]); - }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserSecurityvue_type_template_id_8def157e_hoisted_24, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, UserSecurityvue_type_template_id_03cd1dd8_hoisted_23, 8, UserSecurityvue_type_template_id_03cd1dd8_hoisted_21)], 8, UserSecurityvue_type_template_id_03cd1dd8_hoisted_18)])]); + }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserSecurityvue_type_template_id_03cd1dd8_hoisted_24, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: _ctx.addNewTokenLink, class: "addNewToken" - }, [UserSecurityvue_type_template_id_8def157e_hoisted_26, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_CreateNewToken')), 1)], 8, UserSecurityvue_type_template_id_8def157e_hoisted_25), (_ctx$tokens2 = _ctx.tokens) !== null && _ctx$tokens2 !== void 0 && _ctx$tokens2.length ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("form", { + }, [UserSecurityvue_type_template_id_03cd1dd8_hoisted_26, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_CreateNewToken')), 1)], 8, UserSecurityvue_type_template_id_03cd1dd8_hoisted_25), (_ctx$tokens2 = _ctx.tokens) !== null && _ctx$tokens2 !== void 0 && _ctx$tokens2.length ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("form", { key: 0, method: "post", action: _ctx.deleteTokenAction, @@ -4222,12 +4222,12 @@ function UserSecurityvue_type_template_id_8def157e_render(_ctx, _cache, $props, name: "nonce", type: "hidden", value: _ctx.deleteTokenNonce - }, null, 8, UserSecurityvue_type_template_id_8def157e_hoisted_28), UserSecurityvue_type_template_id_8def157e_hoisted_29, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("button", UserSecurityvue_type_template_id_8def157e_hoisted_30, [UserSecurityvue_type_template_id_8def157e_hoisted_31, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_DeleteAllTokens')), 1)])], 8, UserSecurityvue_type_template_id_8def157e_hoisted_27)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])]; + }, null, 8, UserSecurityvue_type_template_id_03cd1dd8_hoisted_28), UserSecurityvue_type_template_id_03cd1dd8_hoisted_29, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("button", UserSecurityvue_type_template_id_03cd1dd8_hoisted_30, [UserSecurityvue_type_template_id_03cd1dd8_hoisted_31, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_DeleteAllTokens')), 1)])], 8, UserSecurityvue_type_template_id_03cd1dd8_hoisted_27)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])]; }), _: 1 }, 8, ["content-title"])]); } -// CONCATENATED MODULE: ./plugins/UsersManager/vue/src/UserSecurity/UserSecurity.vue?vue&type=template&id=8def157e +// CONCATENATED MODULE: ./plugins/UsersManager/vue/src/UserSecurity/UserSecurity.vue?vue&type=template&id=03cd1dd8 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/UserSecurity/UserSecurity.vue?vue&type=script&lang=ts @@ -4314,7 +4314,7 @@ function UserSecurityvue_type_template_id_8def157e_render(_ctx, _cache, $props, -UserSecurityvue_type_script_lang_ts.render = UserSecurityvue_type_template_id_8def157e_render +UserSecurityvue_type_script_lang_ts.render = UserSecurityvue_type_template_id_03cd1dd8_render /* harmony default export */ var UserSecurity = (UserSecurityvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/UserSettings/UserSettings.vue?vue&type=template&id=9b4f242a diff --git a/plugins/UsersManager/vue/dist/UsersManager.umd.min.js b/plugins/UsersManager/vue/dist/UsersManager.umd.min.js index 0663c7c3afd..f63e0097184 100644 --- a/plugins/UsersManager/vue/dist/UsersManager.umd.min.js +++ b/plugins/UsersManager/vue/dist/UsersManager.umd.min.js @@ -4,7 +4,7 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var C=function(){function e(){var t=this;h(this,e),v(this,"privateState",Object(o["reactive"])({isLoading:!1,capabilities:[]})),v(this,"state",Object(o["computed"])((function(){return Object(o["readonly"])(t.privateState)}))),v(this,"capabilities",Object(o["computed"])((function(){return t.state.value.capabilities}))),v(this,"isLoading",Object(o["computed"])((function(){return t.state.value.isLoading}))),v(this,"fetchPromise",void 0)}return j(e,[{key:"init",value:function(){return this.fetchCapabilities()}},{key:"fetchCapabilities",value:function(){var e=this;return this.fetchPromise||(this.privateState.isLoading=!0,this.fetchPromise=g["AjaxHelper"].fetch({method:"UsersManager.getAvailableCapabilities"}).then((function(t){return e.privateState.capabilities=t,e.capabilities.value})).finally((function(){e.privateState.isLoading=!1}))),this.fetchPromise}}]),e}(),y=new C,k=window,N=k.$,S=Object(o["defineComponent"])({props:{idsite:[String,Number],siteName:{type:String,required:!0},userLogin:{type:String,required:!0},userRole:{type:String,required:!0},capabilities:Array},components:{Field:f["Field"]},data:function(){return{theCapabilities:this.capabilities||[],isBusy:!1,isAddingCapability:!1,capabilityToAddId:null,capabilityToRemoveId:null,capabilityToAddOrRemove:null}},emits:["change"],watch:{capabilities:function(e){e&&(this.theCapabilities=e)}},created:function(){var e=this;y.init(),this.capabilities?this.theCapabilities=this.capabilities:(this.isBusy=!0,g["AjaxHelper"].fetch({method:"UsersManager.getUsersPlusRole",limit:"1",filter_search:this.userLogin}).then((function(e){return e&&e.capabilities?e.capabilities:[]})).then((function(t){e.theCapabilities=t})).finally((function(){e.isBusy=!1})))},methods:{onToggleCapability:function(e){var t=this;this.isAddingCapability=e;var n=e?this.capabilityToAddId:this.capabilityToRemoveId;this.capabilityToAddOrRemove=null,this.availableCapabilities.forEach((function(e){e.id===n&&(t.capabilityToAddOrRemove=e)})),this.$refs.confirmCapabilityToggleModal&&N(this.$refs.confirmCapabilityToggleModal).modal({dismissible:!1,yes:function(){return null}}).modal("open")},toggleCapability:function(){this.isAddingCapability?this.addCapability(this.capabilityToAddOrRemove):this.removeCapability(this.capabilityToAddOrRemove)},isIncludedInRole:function(e){return-1!==(e.includedInRoles||[]).indexOf(this.userRole)},getCapabilitiesList:function(){var e=this,t=[];return this.availableCapabilities.forEach((function(n){e.isIncludedInRole(n)||e.capabilitiesSet[n.id]&&t.push(n.id)})),t},addCapability:function(e){var t=this;this.isBusy=!0,g["AjaxHelper"].post({method:"UsersManager.addCapabilities"},{userLogin:this.userLogin,capabilities:e.id,idSites:this.idsite}).then((function(){t.$emit("change",t.getCapabilitiesList())})).finally((function(){t.isBusy=!1,t.capabilityToAddOrRemove=null,t.capabilityToAddId=null,t.capabilityToRemoveId=null}))},removeCapability:function(e){var t=this;this.isBusy=!0,g["AjaxHelper"].post({method:"UsersManager.removeCapabilities"},{userLogin:this.userLogin,capabilities:e.id,idSites:this.idsite}).then((function(){t.$emit("change",t.getCapabilitiesList())})).finally((function(){t.isBusy=!1,t.capabilityToAddOrRemove=null,t.capabilityToAddId=null,t.capabilityToRemoveId=null}))}},computed:{availableCapabilities:function(){return y.capabilities.value},confirmAddCapabilityToggleContent:function(){return Object(g["translate"])("UsersManager_AreYouSureAddCapability","".concat(this.userLogin,""),"".concat(this.capabilityToAddOrRemove?this.capabilityToAddOrRemove.name:"",""),"".concat(this.siteNameText,""))},confirmCapabilityToggleContent:function(){return Object(g["translate"])("UsersManager_AreYouSureRemoveCapability","".concat(this.capabilityToAddOrRemove?this.capabilityToAddOrRemove.name:"",""),"".concat(this.userLogin,""),"".concat(this.siteNameText,""))},siteNameText:function(){return g["Matomo"].helper.htmlEntities(this.siteName)},availableCapabilitiesGrouped:function(){var e=this,t=this.availableCapabilities.filter((function(t){return!e.capabilitiesSet[t.id]})).map((function(e){return{group:e.category,key:e.id,value:e.name,tooltip:e.description}}));return t.sort((function(e,t){return e.group===t.group?e.value===t.value?0:e.valuee.limit?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",q,[Object(o["createElementVNode"])("div",$,[Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["prev",{disabled:e.offset<=0}])},[Object(o["createElementVNode"])("span",{class:"pointer",onClick:t[6]||(t[6]=function(t){return e.gotoPreviousPage()})},"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],2),Object(o["createElementVNode"])("span",G,[Object(o["createElementVNode"])("span",{textContent:Object(o["toDisplayString"])(e.paginationText)},null,8,z)]),Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["next",{disabled:e.offset+e.limit>=e.totalEntries}])},[Object(o["createElementVNode"])("span",{class:"pointer",onClick:t[7]||(t[7]=function(t){return e.gotoNextPage()})},Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],2)])])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",W,[e.isRoleHelpToggled?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.rolesHelpText)},null,8,Y)]})),_:1})):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",X,[e.isCapabilitiesHelpToggled?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.translate("UsersManager_CapabilitiesHelp")),1)]})),_:1})):Object(o["createCommentVNode"])("",!0)]),Object(o["withDirectives"])(Object(o["createElementVNode"])("table",J,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",K,[Object(o["createElementVNode"])("span",Q,[Object(o["createElementVNode"])("label",null,[Object(o["createElementVNode"])("input",{type:"checkbox",id:"perm_edit_select_all",checked:e.isAllCheckboxSelected,onChange:t[8]||(t[8]=function(t){return e.onAllCheckboxChange(t)})},null,40,Z),ee])])]),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_Name")),1),Object(o["createElementVNode"])("th",te,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize("".concat(e.translate("UsersManager_Role")," "))},null,8,ne),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isRoleHelpToggled}]),onClick:t[9]||(t[9]=Object(o["withModifiers"])((function(t){return e.isRoleHelpToggled=!e.isRoleHelpToggled}),["prevent"]))},re,2)]),Object(o["createElementVNode"])("th",oe,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize("".concat(e.translate("UsersManager_Capabilities")," "))},null,8,ie),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isCapabilitiesHelpToggled}]),onClick:t[10]||(t[10]=Object(o["withModifiers"])((function(t){return e.isCapabilitiesHelpToggled=!e.isCapabilitiesHelpToggled}),["prevent"]))},le,2)])])]),Object(o["createElementVNode"])("tbody",null,[e.isAllCheckboxSelected&&e.siteAccess.length=(this.totalEntries||0)||(this.offset=e,this.fetchAccess())},showRemoveAccessConfirm:function(){Re(this.$refs.deleteAccessConfirmModal).modal({dismissible:!1}).modal("open")},changeUserRole:function(){var e=this,t=function(){var t=[];return Object.keys(e.selectedRows).forEach((function(n){e.selectedRows[n]&&e.siteAccess[n]&&t.push(e.siteAccess[n].idsite)})),t},n=function(){return g["AjaxHelper"].fetch({method:"UsersManager.getSitesAccessForUser",filter_search:e.siteNameFilter,filter_access:e.accessLevelFilter,userLogin:e.userLogin,filter_limit:"-1"}).then((function(e){return e.map((function(e){return e.idsite}))}))};return this.isLoadingAccess=!0,Promise.resolve().then((function(){return e.siteAccessToChange?[e.siteAccessToChange.idsite]:e.areAllResultsSelected?n():t()})).then((function(t){return g["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:e.userLogin,access:e.roleToChangeTo,idSites:t})})).catch((function(){})).then((function(){return e.$emit("accessChanged"),e.fetchAccess()}))},showChangeAccessConfirm:function(){var e=this;Re(this.$refs.changeAccessConfirmModal).modal({dismissible:!1,onCloseEnd:function(){e.accessChangeEvent=null}}).modal("open")},getRoleDisplay:function(e){var t=null;return this.filteredAccessLevels.forEach((function(n){n.key===e&&(t=n.value)})),t},giveAccessToAllSites:function(){var e=this;this.isGivingAccessToAllSites=!0,g["AjaxHelper"].fetch({method:"SitesManager.getSitesWithAdminAccess",filter_limit:-1}).then((function(t){var n=t.map((function(e){return e.idsite}));return g["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:e.userLogin,access:e.allWebsitesAccssLevelSet,idSites:n})})).then((function(){return e.fetchAccess()})).finally((function(){e.isGivingAccessToAllSites=!1}))},showChangeAccessAllSitesModal:function(){Re(this.$refs.confirmGiveAccessAllSitesModal).modal({dismissible:!1}).modal("open")},onChangeSiteFilter:function(e){var t=this;setTimeout((function(){var n=e.target.value;t.siteNameFilter!==n&&(t.siteNameFilter=n,t.offset=0,t.fetchAccess())}))},onRoleChange:function(e,t){this.siteAccessToChange=e,this.roleToChangeTo=t.value,this.accessChangeEvent=t,this.showChangeAccessConfirm()}},computed:{rolesHelpText:function(){return Object(g["translate"])("UsersManager_RolesHelp",'',"",'',"")},theDisplayedWebsitesAreSelectedText:function(){var e=Object(g["translate"])("UsersManager_TheDisplayedWebsitesAreSelected","".concat(this.siteAccess.length,""));return"".concat(e," ")},clickToSelectAllText:function(){return Object(g["translate"])("UsersManager_ClickToSelectAll","".concat(this.totalEntries,""))},allWebsitesAreSelectedText:function(){return Object(g["translate"])("UsersManager_AllWebsitesAreSelected","".concat(this.totalEntries,""))},clickToSelectDisplayedWebsitesText:function(){return Object(g["translate"])("UsersManager_ClickToSelectDisplayedWebsites","".concat(this.siteAccess.length,""))},deletePermConfirmSingleText:function(){return Object(g["translate"])("UsersManager_DeletePermConfirmSingle","".concat(this.userLogin,""),"".concat(this.siteAccessToChangeName,""))},deletePermConfirmMultipleText:function(){return Object(g["translate"])("UsersManager_DeletePermConfirmMultiple","".concat(this.userLogin,""),"".concat(this.affectedSitesCount,""))},changePermToSiteConfirmSingleText:function(){return Object(g["translate"])("UsersManager_ChangePermToSiteConfirmSingle","".concat(this.userLogin,""),"".concat(this.siteAccessToChangeName,""),"".concat(this.getRoleDisplay(this.roleToChangeTo),""))},changePermToSiteConfirmMultipleText:function(){return Object(g["translate"])("UsersManager_ChangePermToSiteConfirmMultiple","".concat(this.userLogin,""),"".concat(this.affectedSitesCount,""),"".concat(this.getRoleDisplay(this.roleToChangeTo),""))},changePermToAllSitesConfirmText:function(){return Object(g["translate"])("UsersManager_ChangePermToAllSitesConfirm","".concat(this.userLogin,""),"".concat(this.getRoleDisplay(this.allWebsitesAccssLevelSet),""))},paginationLowerBound:function(){return this.offset+1},paginationUpperBound:function(){return this.totalEntries?Math.min(this.offset+this.limit,this.totalEntries):"?"},filteredAccessLevels:function(){return this.accessLevels.filter((function(e){return"superuser"!==e.key&&"role"===e.type}))},filteredSelectAccessLevels:function(){return this.filterAccessLevels.filter((function(e){return"superuser"!==e.key}))},selectedRowsCount:function(){var e=0;return Object.values(this.selectedRows).forEach((function(t){t&&(e+=1)})),e},affectedSitesCount:function(){return this.areAllResultsSelected?this.totalEntries:this.selectedRowsCount},allPropsWatch:function(){return this.userLogin,this.limit,this.accessLevels,this.filterAccessLevels,Date.now()},siteAccessToChangeName:function(){return this.siteAccessToChange?g["Matomo"].helper.htmlEntities(this.siteAccessToChange.site_name):""},paginationText:function(){var e=Object(g["translate"])("General_Pagination","".concat(this.paginationLowerBound),"".concat(this.paginationUpperBound),"".concat(this.totalEntries));return" ".concat(e," ")}}});Pe.render=xe;var Fe=Pe,He={class:"row"},Ie={key:0,class:"col s12 m6 invite-notes"},qe={class:"form-help"},$e=["innerHTML"],Ge={key:1,class:"col m2 entityList"},ze={class:"listCircle"},We={key:0,class:"icon-warning"},Ye=Object(o["createElementVNode"])("div",{class:"save-button-spacer hide-on-small-only"},null,-1),Xe={href:"",class:"entityCancelLink"},Je=Object(o["createElementVNode"])("span",{class:"icon-arrow-left"},"  ",-1),Ke={class:"visibleTab col m10"},Qe={key:0,class:"basic-info-tab"},Ze={class:"form-group row",style:{position:"relative"}},et={class:"col s12 m6 save-button"},tt={key:0,class:"resend-notes"},nt=["innerHTML"],st={key:0,class:"entityCancel"},rt=Object(o["createElementVNode"])("span",{class:"icon icon-arrow-left"},"  ",-1),ot={key:1,class:"user-permissions"},it={key:0},at={key:1,class:"alert alert-info"},lt={key:2,class:"superuser-access form-group"},ct={key:0},dt={key:1},ut={key:3,class:"twofa-reset form-group"},mt={class:"resetTwoFa"},bt=["innerHTML"];function pt(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("PasswordConfirmation"),d=Object(o["resolveComponent"])("UserPermissionsEdit"),u=Object(o["resolveComponent"])("ContentBlock"),m=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(u,{class:Object(o["normalizeClass"])(["userEditForm",{loading:e.isSavingUserInfo}]),"content-title":"".concat(e.formTitle," ").concat(e.isAdd?"":"".concat(e.theUser.login))},{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",He,[e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ie,[Object(o["createElementVNode"])("div",qe,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_InviteSuccessNotification",[e.inviteTokenExpiryDays]))},null,8,$e)])])):Object(o["createCommentVNode"])("",!0),e.isAdd?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ge,[Object(o["createElementVNode"])("ul",ze,[Object(o["createElementVNode"])("li",{class:Object(o["normalizeClass"])([{active:"basic"===e.activeTab},"menuBasicInfo"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[0]||(t[0]=Object(o["withModifiers"])((function(t){return e.activeTab="basic"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_BasicInformation")),1)],2),Object(o["createElementVNode"])("li",{class:Object(o["normalizeClass"])([{active:"permissions"===e.activeTab},"menuPermissions"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.activeTab="permissions"}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("UsersManager_Permissions")),1),e.userHasAccess||e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",We))],2),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:0,class:Object(o["normalizeClass"])([{active:"superuser"===e.activeTab},"menuSuperuser"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[2]||(t[2]=Object(o["withModifiers"])((function(t){return e.activeTab="superuser"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserAccess")),1)],2)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole&&e.theUser.uses_2fa&&!e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:1,class:Object(o["normalizeClass"])([{active:"2fa"===e.activeTab},"menuUserTwoFa"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[3]||(t[3]=Object(o["withModifiers"])((function(t){return e.activeTab="2fa"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_TwoFactorAuthentication")),1)],2)):Object(o["createCommentVNode"])("",!0)]),Ye,Object(o["createElementVNode"])("div",{class:"entityCancel",onClick:t[4]||(t[4]=Object(o["withModifiers"])((function(t){return e.onDoneEditing()}),["prevent"]))},[Object(o["createElementVNode"])("a",Xe,[Je,Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BackToUser")),1)])])])),Object(o["createElementVNode"])("div",Ke,["basic"===e.activeTab?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Qe,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{modelValue:e.theUser.login,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.theUser.login=t}),disabled:e.isSavingUserInfo||!e.isAdd||e.isShowingPasswordConfirm,autocomplete:"off",uicontrol:"text",name:"user_login",maxlength:100,title:e.translate("General_Username")},null,8,["modelValue","disabled","title"])]),Object(o["createElementVNode"])("div",null,[e.isPending?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,"model-value":e.theUser.password,disabled:e.isSavingUserInfo||"superuser"!==e.currentUserRole&&!e.isAdd||e.isShowingPasswordConfirm,"onUpdate:modelValue":t[6]||(t[6]=function(t){e.theUser.password=t,e.isPasswordModified=!0}),uicontrol:"password",name:"user_password",autocomplete:"new-password",title:e.translate("General_Password")},null,8,["model-value","disabled","title"]))]),Object(o["createElementVNode"])("div",null,["superuser"===e.currentUserRole||e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,modelValue:e.theUser.email,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.theUser.email=t}),disabled:e.isSavingUserInfo||"superuser"!==e.currentUserRole&&!e.isAdd||e.isShowingPasswordConfirm,uicontrol:"text",name:"user_email",autocomplete:"off",maxlength:100,title:e.translate("UsersManager_Email")},null,8,["modelValue","disabled","title"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",null,[e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,modelValue:e.firstSiteAccess,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.firstSiteAccess=t}),disabled:e.isSavingUserInfo,uicontrol:"site",name:"user_site","ui-control-attributes":{onlySitesWithAdminAccess:!0},title:e.translate("UsersManager_FirstWebsitePermission"),"inline-help":e.translate("UsersManager_FirstSiteInlineHelp")},null,8,["modelValue","disabled","title","inline-help"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("div",Ze,[Object(o["createElementVNode"])("div",et,["superuser"===e.currentUserRole||e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(l,{key:0,value:e.saveButtonLabel,disabled:e.isAdd&&(!e.firstSiteAccess||!e.firstSiteAccess.id),saving:e.isSavingUserInfo,onConfirm:e.saveUserInfo},null,8,["value","disabled","saving","onConfirm"])):Object(o["createCommentVNode"])("",!0)])]),e.user&&e.isPending?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",tt,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_InvitationSent"))+" ",1),Object(o["createElementVNode"])("span",{class:"resend-link",onClick:t[9]||(t[9]=function(){return e.resendRequestedUser&&e.resendRequestedUser.apply(e,arguments)}),innerHTML:e.$sanitize(e.translate("UsersManager_ResendInvite")+"/"+e.translate("UsersManager_CopyLink"))},null,8,nt)])):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationForInviteUser,"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.showPasswordConfirmationForInviteUser=t}),onConfirmed:e.inviteUser},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])]),e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",st,[Object(o["createElementVNode"])("a",{href:"",class:"entityCancelLink",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.onDoneEditing()}),["prevent"]))},[rt,Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BackToUser")),1)])])):Object(o["createCommentVNode"])("",!0)])):Object(o["createCommentVNode"])("",!0),e.isAdd?Object(o["createCommentVNode"])("",!0):Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ot,[e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",it,[Object(o["createVNode"])(d,{"user-login":e.theUser.login,onUserHasAccessDetected:t[12]||(t[12]=function(t){return e.userHasAccess=t.hasAccess}),onAccessChanged:t[13]||(t[13]=function(t){return e.isUserModified=!0}),"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels},null,8,["user-login","access-levels","filter-access-levels"])])),e.theUser.superuser_access?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",at,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUsersPermissionsNotice")),1)):Object(o["createCommentVNode"])("",!0)],512)),[[o["vShow"],"permissions"===e.activeTab]]),"superuser"!==e.activeTab||"superuser"!==e.currentUserRole||e.isAdd?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",lt,[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserIntro1")),1),Object(o["createElementVNode"])("p",null,[Object(o["createElementVNode"])("strong",null,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserIntro2")),1)]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{modelValue:e.superUserAccessChecked,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.superUserAccessChecked=t}),onClick:t[15]||(t[15]=function(t){return e.confirmSuperUserChange()}),disabled:e.isSavingUserInfo,uicontrol:"checkbox",name:"superuser_access",title:e.translate("UsersManager_HasSuperUserAccess")},null,8,["modelValue","disabled","title"])]),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationForSuperUser,"onUpdate:modelValue":t[16]||(t[16]=function(t){return e.showPasswordConfirmationForSuperUser=t}),onConfirmed:e.toggleSuperuserAccess,onAborted:t[17]||(t[17]=function(t){return e.setSuperUserAccessChecked()})},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_AreYouSure")),1),e.theUser.superuser_access?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",ct,Object(o["toDisplayString"])(e.translate("UsersManager_RemoveSuperuserAccessConfirm")),1)):Object(o["createCommentVNode"])("",!0),e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",dt,Object(o["toDisplayString"])(e.translate("UsersManager_AddSuperuserAccessConfirm")),1))]})),_:1},8,["modelValue","onConfirmed"])])),"superuser"!==e.currentUserRole||e.isAdd?Object(o["createCommentVNode"])("",!0):Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ut,[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ResetTwoFactorAuthenticationInfo")),1),Object(o["createElementVNode"])("div",mt,[Object(o["createVNode"])(l,{saving:e.isResetting2FA,onConfirm:t[18]||(t[18]=function(t){return e.confirmReset2FA()}),value:e.translate("UsersManager_ResetTwoFactorAuthentication")},null,8,["saving","value"])]),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationFor2FA,"onUpdate:modelValue":t[19]||(t[19]=function(t){return e.showPasswordConfirmationFor2FA=t}),onConfirmed:e.reset2FA},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_AreYouSure")),1),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])],512)),[[o["vShow"],"2fa"===e.activeTab]])])],512),[[m]]),Object(o["createVNode"])(c,{modelValue:e.isShowingPasswordConfirm,"onUpdate:modelValue":t[20]||(t[20]=function(t){return e.isShowingPasswordConfirm=t}),onConfirmed:e.updateUser},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",{innerHTML:e.$sanitize(e.changePasswordTitle)},null,8,bt),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])]})),_:1},8,["class","content-title"])}var gt={login:"",superuser_access:!1,uses_2fa:!1,password:"",email:"",invite_status:""},ft=Object(o["defineComponent"])({props:{user:Object,currentUserRole:{type:String,required:!0},accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},initialSiteId:{type:[String,Number],required:!0},initialSiteName:{type:String,required:!0},inviteTokenExpiryDays:{type:String,required:!0}},components:{ContentBlock:g["ContentBlock"],Field:f["Field"],SaveButton:f["SaveButton"],UserPermissionsEdit:Fe,PasswordConfirmation:f["PasswordConfirmation"]},directives:{Form:f["Form"]},data:function(){return{theUser:this.user||Object.assign({},gt),activeTab:"basic",permissionsForIdSite:1,isSavingUserInfo:!1,userHasAccess:!0,firstSiteAccess:{id:this.initialSiteId,name:this.initialSiteName},isUserModified:!1,isPasswordModified:!1,superUserAccessChecked:null,showPasswordConfirmationForSuperUser:!1,showPasswordConfirmationFor2FA:!1,showPasswordConfirmationForInviteUser:!1,isResetting2FA:!1,isShowingPasswordConfirm:!1}},emits:["done","updated","resendInvite"],watch:{user:function(e){this.onUserChange(e)}},created:function(){this.onUserChange(this.user)},methods:{onUserChange:function(e){this.theUser=e||Object.assign({},gt),this.theUser.password||this.resetPasswordVar(),this.setSuperUserAccessChecked()},confirmSuperUserChange:function(){this.showPasswordConfirmationForSuperUser=!0},confirmReset2FA:function(){this.showPasswordConfirmationFor2FA=!0},toggleSuperuserAccess:function(e){var t=this;this.isSavingUserInfo=!0,g["AjaxHelper"].post({method:"UsersManager.setSuperUserAccess"},{userLogin:this.theUser.login,hasSuperUserAccess:this.theUser.superuser_access?"0":"1",passwordConfirmation:e}).then((function(){t.theUser.superuser_access=!t.theUser.superuser_access})).catch((function(){})).then((function(){t.isSavingUserInfo=!1,t.setSuperUserAccessChecked()}))},saveUserInfo:function(){this.isAdd?this.showPasswordConfirmationForInviteUser=!0:this.isShowingPasswordConfirm=!0},resendRequestedUser:function(){this.$emit("resendInvite",{user:this.user})},inviteUser:function(e){var t=this;return this.isSavingUserInfo=!0,g["AjaxHelper"].post({method:"UsersManager.inviteUser"},{userLogin:this.theUser.login,email:this.theUser.email,initialIdSite:this.firstSiteAccess?this.firstSiteAccess.id:void 0,passwordConfirmation:e}).catch((function(e){throw t.isSavingUserInfo=!1,e})).then((function(){t.firstSiteAccess=null,t.isSavingUserInfo=!1,t.isUserModified=!0,t.theUser.invite_status="pending",t.resetPasswordVar(),t.showUserCreatedNotification(),t.$emit("updated",{user:Object(o["readonly"])(t.theUser)})}))},resetPasswordVar:function(){this.isAdd||(this.theUser.password="XXXXXXXX")},showUserSavedNotification:function(){g["NotificationsStore"].show({message:Object(g["translate"])("General_YourChangesHaveBeenSaved"),context:"success",type:"toast"})},showUserCreatedNotification:function(){g["NotificationsStore"].show({message:Object(g["translate"])("UsersManager_InviteSuccess"),context:"success",type:"toast"})},reset2FA:function(e){var t=this;return this.isResetting2FA=!0,g["AjaxHelper"].post({method:"TwoFactorAuth.resetTwoFactorAuth"},{userLogin:this.theUser.login,passwordConfirmation:e}).catch((function(e){throw t.isResetting2FA=!1,e})).then((function(){t.isResetting2FA=!1,t.theUser.uses_2fa=!1,t.activeTab="basic",t.showUserSavedNotification()}))},updateUser:function(e){var t=this;return this.isSavingUserInfo=!0,g["AjaxHelper"].post({method:"UsersManager.updateUser"},{userLogin:this.theUser.login,password:this.isPasswordModified&&this.theUser.password?this.theUser.password:void 0,passwordConfirmation:e,email:this.theUser.email}).then((function(){t.isSavingUserInfo=!1,t.isUserModified=!0,t.isPasswordModified=!1,t.resetPasswordVar(),t.showUserSavedNotification(),t.$emit("updated",{user:Object(o["readonly"])(t.theUser)})})).catch((function(){t.isSavingUserInfo=!1}))},setSuperUserAccessChecked:function(){this.superUserAccessChecked=!!this.theUser.superuser_access},onDoneEditing:function(){this.$emit("done",{isUserModified:this.isUserModified})}},computed:{formTitle:function(){return this.isAdd?Object(g["translate"])("UsersManager_InviteNewUser"):""},saveButtonLabel:function(){return this.isAdd?Object(g["translate"])("UsersManager_InviteUser"):Object(g["translate"])("UsersManager_SaveBasicInfo")},isPending:function(){return!this.user||!("pending"!==this.user.invite_status&&!Number.isInteger(this.user.invite_status))},isAdd:function(){return!this.user},changePasswordTitle:function(){return Object(g["translate"])("UsersManager_AreYouSureChangeDetails","".concat(this.theUser.login,""))}}});ft.render=pt;var ht=ft,Ot={class:"userListFilters row"},jt={class:"col s12 m12 l8"},vt={class:"input-field col s12 m3 l3"},Ct={id:"user-list-bulk-actions",class:"dropdown-content"},yt={class:"dropdown-trigger","data-target":"bulk-set-access"},kt={id:"bulk-set-access",class:"dropdown-content"},Nt=["onClick"],St={key:0},Vt={class:"input-field col s12 m3 l3"},Ut={class:"permissions-for-selector"},Et={class:"input-field col s12 m3 l3"},wt={class:"input-field col s12 m3 l3"},At={key:0,class:"input-field col s12 m12 l4 users-list-pagination-container"},Tt={class:"usersListPagination"},Mt={class:"pointer"},Bt={class:"counter"},_t={class:"pointer"},Dt={key:0,class:"roles-help-notification"},xt=["innerHTML"],Lt={class:"select-cell"},Rt={class:"checkbox-container"},Pt=Object(o["createElementVNode"])("span",null,null,-1),Ft={class:"first"},Ht={class:"role_header"},It={style:{"margin-right":"3.5px"}},qt=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),$t=[qt],Gt={key:0},zt=["title"],Wt={key:2},Yt={class:"actions-cell-header"},Xt={key:0,class:"select-all-row"},Jt={colspan:"8"},Kt={key:0},Qt=["innerHTML"],Zt=["innerHTML"],en={key:1},tn=["innerHTML"],nn=["innerHTML"],sn=["id"],rn={class:"select-cell"},on={class:"checkbox-container"},an=["id","onUpdate:modelValue"],ln=Object(o["createElementVNode"])("span",null,null,-1),cn={id:"userLogin"},dn={class:"access-cell"},un={key:0,id:"email"},mn={key:1,id:"twofa"},bn={key:0,class:"icon-ok"},pn={key:1,class:"icon-close"},gn={key:2,id:"last_seen"},fn={id:"status"},hn=["title"],On={class:"center actions-cell"},jn=["onClick"],vn=Object(o["createElementVNode"])("span",{class:"icon-email"},null,-1),Cn=[vn],yn=["onClick"],kn=Object(o["createElementVNode"])("span",{class:"icon-edit"},null,-1),Nn=[kn],Sn=["onClick"],Vn=Object(o["createElementVNode"])("span",{class:"icon-delete"},null,-1),Un=[Vn],En=["innerHTML"],wn=["innerHTML"],An={class:"change-user-role-confirm-modal modal",ref:"changeUserRoleConfirmModal"},Tn={class:"modal-content"},Mn=["innerHTML"],Bn={key:1},_n=["innerHTML"],Dn=["innerHTML"],xn={class:"modal-footer"};function Ln(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("ActivityIndicator"),c=Object(o["resolveComponent"])("Notification"),d=Object(o["resolveComponent"])("ContentBlock"),u=Object(o["resolveComponent"])("PasswordConfirmation"),m=Object(o["resolveDirective"])("dropdown-menu"),b=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["pagedUsersList",{loading:e.isLoadingUsers}])},[Object(o["createElementVNode"])("div",Ot,[Object(o["createElementVNode"])("div",jt,[Object(o["createElementVNode"])("div",vt,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["dropdown-trigger btn bulk-actions",{disabled:e.isBulkActionsDisabled}]),href:"","data-target":"user-list-bulk-actions"},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BulkActions")),1)],2),[[m]]),Object(o["createElementVNode"])("ul",Ct,[Object(o["createElementVNode"])("li",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",yt,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_SetPermission")),1)],512),[[m]]),Object(o["createElementVNode"])("ul",kt,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.bulkActionAccessLevels,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:t.key},[Object(o["createElementVNode"])("a",{href:"",onClick:Object(o["withModifiers"])((function(n){e.userToChange=null,e.roleToChangeTo=t.key,e.showAccessChangeConfirm()}),["prevent"])},Object(o["toDisplayString"])(t.value),9,Nt)])})),128))])]),Object(o["createElementVNode"])("li",null,[Object(o["createElementVNode"])("a",{href:"",onClick:t[0]||(t[0]=Object(o["withModifiers"])((function(t){e.userToChange=null,e.roleToChangeTo="noaccess",e.showAccessChangeConfirm()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_RemovePermissions")),1)]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",St,[Object(o["createElementVNode"])("a",{href:"",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.showDeleteConfirm()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_DeleteUsers")),1)])):Object(o["createCommentVNode"])("",!0)])]),Object(o["createElementVNode"])("div",Vt,[Object(o["createElementVNode"])("div",Ut,[Object(o["createVNode"])(a,{"model-value":e.userTextFilter,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.onUserTextFilterChange(t)}),name:"user-text-filter",uicontrol:"text","full-width":!0,placeholder:e.translate("UsersManager_UserSearch")},null,8,["model-value","placeholder"])])]),Object(o["createElementVNode"])("div",Et,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":e.accessLevelFilter,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.accessLevelFilter=t,e.changeSearch({filter_access:e.accessLevelFilter,offset:0})}),name:"access-level-filter",uicontrol:"select",options:e.filterAccessLevels,"full-width":!0,placeholder:e.translate("UsersManager_FilterByAccess")},null,8,["model-value","options","placeholder"])])]),Object(o["createElementVNode"])("div",wt,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":e.statusLevelFilter,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.statusLevelFilter=t,e.changeSearch({filter_status:e.statusLevelFilter,offset:0})}),name:"status-level-filter",uicontrol:"select",options:e.filterStatusLevels,"full-width":!0,placeholder:e.translate("UsersManager_FilterByStatus")},null,8,["model-value","options","placeholder"])])])]),e.totalEntries>e.searchParams.limit?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",At,[Object(o["createElementVNode"])("div",Tt,[Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["btn prev",{disabled:e.searchParams.offset<=0}]),onClick:t[5]||(t[5]=Object(o["withModifiers"])((function(t){return e.gotoPreviousPage()}),["prevent"]))},[Object(o["createElementVNode"])("span",Mt,"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],2),Object(o["createElementVNode"])("div",Bt,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])({visibility:e.isLoadingUsers?"hidden":"visible"})},Object(o["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.totalEntries)),3),Object(o["createVNode"])(l,{loading:e.isLoadingUsers},null,8,["loading"])]),Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["btn next",{disabled:e.searchParams.offset+e.searchParams.limit>=e.totalEntries}]),onClick:t[6]||(t[6]=Object(o["withModifiers"])((function(t){return e.gotoNextPage()}),["prevent"]))},[Object(o["createElementVNode"])("span",_t,Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],2)])])):Object(o["createCommentVNode"])("",!0)]),e.isRoleHelpToggled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Dt,[Object(o["createVNode"])(c,{context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.rolesHelpText)},null,8,xt)]})),_:1})])):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(d,null,{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("table",{id:"manageUsersTable",class:Object(o["normalizeClass"])({loading:e.isLoadingUsers})},[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",Lt,[Object(o["createElementVNode"])("span",Rt,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"paged_users_select_all",checked:"checked","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.isAllCheckboxSelected=t}),onChange:t[8]||(t[8]=function(t){return e.onAllCheckboxChange()})},null,544),[[o["vModelCheckbox"],e.isAllCheckboxSelected]]),Pt])])]),Object(o["createElementVNode"])("th",Ft,Object(o["toDisplayString"])(e.translate("UsersManager_Username")),1),Object(o["createElementVNode"])("th",Ht,[Object(o["createElementVNode"])("span",It,Object(o["toDisplayString"])(e.translate("UsersManager_RoleFor")),1),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isRoleHelpToggled}]),onClick:t[9]||(t[9]=Object(o["withModifiers"])((function(t){return e.isRoleHelpToggled=!e.isRoleHelpToggled}),["prevent"]))},$t,2),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{class:"permissions-for-selector","model-value":e.permissionsForSite,"onUpdate:modelValue":t[10]||(t[10]=function(t){e.onPermissionsForUpdate(t)}),uicontrol:"site","ui-control-attributes":{onlySitesWithAdminAccess:"superuser"!==e.currentUserRole}},null,8,["model-value","ui-control-attributes"])])]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",Gt,Object(o["toDisplayString"])(e.translate("UsersManager_Email")),1)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:1,title:e.translate("UsersManager_UsesTwoFactorAuthentication")},Object(o["toDisplayString"])(e.translate("UsersManager_2FA")),9,zt)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",Wt,Object(o["toDisplayString"])(e.translate("UsersManager_LastSeen")),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("UsersManager_Status")),1),Object(o["createElementVNode"])("th",Yt,[Object(o["createElementVNode"])("div",null,Object(o["toDisplayString"])(e.translate("General_Actions")),1)])])]),Object(o["createElementVNode"])("tbody",null,[e.isAllCheckboxSelected&&e.users.length&&e.users.length".concat(e.users.length,""))),style:{"margin-right":"3.5px"}},null,8,Qt),Object(o["createElementVNode"])("a",{class:"toggle-select-all-in-search",href:"#",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.translate("UsersManager_ClickToSelectAll","".concat(e.totalEntries,"")))},null,8,Zt)])),e.areAllResultsSelected?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",en,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_AllUsersAreSelected","".concat(e.totalEntries,""))),style:{"margin-right":"3.5px"}},null,8,tn),Object(o["createElementVNode"])("a",{class:"toggle-select-all-in-search",href:"#",onClick:t[12]||(t[12]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.translate("UsersManager_ClickToSelectDisplayedUsers","".concat(e.users.length,"")))},null,8,nn)])):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.users,(function(n,s){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{id:"row".concat(s),key:n.login},[Object(o["createElementVNode"])("td",rn,[Object(o["createElementVNode"])("span",on,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"paged_users_select_row".concat(s),"onUpdate:modelValue":function(t){return e.selectedRows[s]=t},onClick:t[13]||(t[13]=function(t){return e.onRowSelected()})},null,8,an),[[o["vModelCheckbox"],e.selectedRows[s]]]),ln])])]),Object(o["createElementVNode"])("td",cn,Object(o["toDisplayString"])(n.login),1),Object(o["createElementVNode"])("td",dn,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":n.role,"onUpdate:modelValue":function(t){e.userToChange=n,e.roleToChangeTo=t,e.showAccessChangeConfirm()},disabled:"superuser"===n.role,uicontrol:"select",options:"anonymous"===n.login?e.anonymousAccessLevels:"noaccess"===n.role?e.onlyRoleAccessLevels:e.accessLevels},null,8,["model-value","onUpdate:modelValue","disabled","options"])])]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",un,Object(o["toDisplayString"])(n.email),1)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",mn,[n.uses_2fa?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",bn)):Object(o["createCommentVNode"])("",!0),n.uses_2fa?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",pn))])):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",gn,Object(o["toDisplayString"])(n.last_seen?"".concat(n.last_seen," ago"):"-"),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("td",fn,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(Number.isInteger(n.invite_status)?"pending":n.invite_status),title:"expired"===n.invite_status?e.translate("UsersManager_ExpiredInviteAutomaticallyRemoved","3"):""},Object(o["toDisplayString"])(e.getInviteStatus(n.invite_status)),11,hn)]),Object(o["createElementVNode"])("td",On,[("superuser"===e.currentUserRole||"admin"===e.currentUserRole&&n.invited_by===e.currentUserLogin)&&"active"!==n.invite_status?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:0,class:"resend table-action",title:"Resend/Copy Invite Link",onClick:function(t){e.userToChange=n,e.resendRequestedUser()}},Cn,8,jn)):Object(o["createCommentVNode"])("",!0),"anonymous"!==n.login?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:1,class:"edituser table-action",title:"Edit",onClick:function(t){return e.$emit("editUser",{user:n})}},Nn,8,yn)):Object(o["createCommentVNode"])("",!0),("superuser"===e.currentUserRole||"admin"===e.currentUserRole&&n.invited_by===e.currentUserLogin)&&"anonymous"!==n.login?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:2,class:"deleteuser table-action",title:"Delete",onClick:function(t){e.userToChange=n,e.showDeleteConfirm()}},Un,8,Sn)):Object(o["createCommentVNode"])("",!0)])],8,sn)})),128))])],2),[[b]])]})),_:1}),Object(o["createVNode"])(u,{modelValue:e.showPasswordConfirmationForUserRemoval,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.showPasswordConfirmationForUserRemoval=t}),onConfirmed:e.deleteRequestedUsers,onAborted:t[15]||(t[15]=function(t){e.userToChange=null,e.roleToChangeTo=null})},{default:Object(o["withCtx"])((function(){return[e.userToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:0,innerHTML:e.$sanitize(e.translate("UsersManager_DeleteUserConfirmSingle","".concat(e.userToChange.login,"")))},null,8,En)):Object(o["createCommentVNode"])("",!0),e.userToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:1,innerHTML:e.$sanitize(e.translate("UsersManager_DeleteUserConfirmMultiple","".concat(e.affectedUsersCount,"")))},null,8,wn)),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"]),Object(o["createElementVNode"])("div",An,[Object(o["createElementVNode"])("div",Tn,[e.userToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.deleteUserPermConfirmSingleText)},null,8,Mn)):Object(o["createCommentVNode"])("",!0),e.userToChange&&"anonymous"===e.userToChange.login&&"view"===e.roleToChangeTo?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",Bn,[Object(o["createElementVNode"])("em",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_Note"))+": ",1),Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_AnonymousUserRoleChangeWarning","anonymous",e.getRoleDisplay(e.roleToChangeTo)))},null,8,_n)])])):Object(o["createCommentVNode"])("",!0),e.userToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:2,innerHTML:e.$sanitize(e.deleteUserPermConfirmMultipleText)},null,8,Dn))]),Object(o["createElementVNode"])("div",xn,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[16]||(t[16]=Object(o["withModifiers"])((function(t){return e.changeUserRole()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[17]||(t[17]=Object(o["withModifiers"])((function(t){e.userToChange=null,e.roleToChangeTo=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512)],2)}var Rn=window,Pn=Rn.$,Fn=Object(o["defineComponent"])({props:{initialSiteId:{type:[String,Number],required:!0},initialSiteName:{type:String,required:!0},currentUserRole:String,isLoadingUsers:Boolean,accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},filterStatusLevels:{type:Array,required:!0},totalEntries:Number,users:{type:Array,required:!0},searchParams:{type:Object,required:!0}},components:{Field:f["Field"],ActivityIndicator:g["ActivityIndicator"],Notification:g["Notification"],ContentBlock:g["ContentBlock"],PasswordConfirmation:f["PasswordConfirmation"]},directives:{DropdownMenu:g["DropdownMenu"],ContentTable:g["ContentTable"]},data:function(){return{areAllResultsSelected:!1,selectedRows:{},isAllCheckboxSelected:!1,isBulkActionsDisabled:!0,userToChange:null,roleToChangeTo:null,accessLevelFilter:null,statusLevelFilter:null,isRoleHelpToggled:!1,userTextFilter:"",permissionsForSite:{id:this.initialSiteId,name:this.initialSiteName},showPasswordConfirmationForUserRemoval:!1}},emits:["editUser","changeUserRole","deleteUser","searchChange","resendInvite"],created:function(){this.onUserTextFilterChange=Object(g["debounce"])(this.onUserTextFilterChange,300)},watch:{users:function(){this.clearSelection()}},methods:{getInviteStatus:function(e){return Number.isInteger(e)?Object(g["translate"])("UsersManager_InviteDayLeft",e):"expired"===e?Object(g["translate"])("UsersManager_Expired"):Object(g["translate"])("UsersManager_Active")},onPermissionsForUpdate:function(e){this.permissionsForSite=e,this.changeSearch({idSite:this.permissionsForSite.id})},clearSelection:function(){this.selectedRows={},this.areAllResultsSelected=!1,this.isBulkActionsDisabled=!0,this.isAllCheckboxSelected=!1,this.userToChange=null},onAllCheckboxChange:function(){if(this.isAllCheckboxSelected){for(var e=0;e!==this.users.length;e+=1)this.selectedRows[e]=!0;this.isBulkActionsDisabled=!1}else this.clearSelection()},changeUserRole:function(){this.$emit("changeUserRole",{users:this.userOperationSubject,role:this.roleToChangeTo})},onRowSelected:function(){var e=this.selectedCount;this.isBulkActionsDisabled=0===e,this.isAllCheckboxSelected=e===this.users.length},deleteRequestedUsers:function(e){this.$emit("deleteUser",{users:this.userOperationSubject,password:e})},resendRequestedUser:function(){this.$emit("resendInvite",{user:this.userToChange})},showDeleteConfirm:function(){this.showPasswordConfirmationForUserRemoval=!0},showAccessChangeConfirm:function(){Pn(this.$refs.changeUserRoleConfirmModal).modal({dismissible:!1}).modal("open")},getRoleDisplay:function(e){var t=null;return this.accessLevels.forEach((function(n){n.key===e&&(t=n.value)})),t},changeSearch:function(e){var t=Object.assign(Object.assign({},this.searchParams),e);this.$emit("searchChange",{params:t})},gotoPreviousPage:function(){this.changeSearch({offset:Math.max(0,this.searchParams.offset-this.searchParams.limit)})},gotoNextPage:function(){var e=this.searchParams.offset+this.searchParams.limit;e>=this.totalEntries||this.changeSearch({offset:e})},onUserTextFilterChange:function(e){this.userTextFilter=e,this.changeSearch({filter_search:e,offset:0})}},computed:{currentUserLogin:function(){return g["Matomo"].userLogin},paginationLowerBound:function(){return this.searchParams.offset+1},paginationUpperBound:function(){if(null===this.totalEntries)return"?";var e=this.searchParams;return Math.min(e.offset+e.limit,this.totalEntries)},userOperationSubject:function(){return this.userToChange?[this.userToChange]:this.areAllResultsSelected?"all":this.selectedUsers},selectedUsers:function(){var e=this,t=this.users,n=[];return Object.keys(this.selectedRows).forEach((function(s){var r=parseInt(s,10);e.selectedRows[s]&&t[r]&&n.push(t[r])})),n},rolesHelpText:function(){var e="https://matomo.org/faq/general/faq_70/",t="https://matomo.org/faq/general/faq_69/";return Object(g["translate"])("UsersManager_RolesHelp",''),"",''),"")},affectedUsersCount:function(){return this.areAllResultsSelected?this.totalEntries||0:this.selectedCount},selectedCount:function(){var e=this,t=0;return Object.keys(this.selectedRows).forEach((function(n){e.selectedRows[n]&&(t+=1)})),t},deleteUserPermConfirmSingleText:function(){var e,t;return Object(g["translate"])("UsersManager_DeleteUserPermConfirmSingle","".concat((null===(e=this.userToChange)||void 0===e?void 0:e.login)||"",""),"".concat(this.getRoleDisplay(this.roleToChangeTo),""),"".concat(g["Matomo"].helper.htmlEntities((null===(t=this.permissionsForSite)||void 0===t?void 0:t.name)||""),""))},deleteUserPermConfirmMultipleText:function(){var e;return Object(g["translate"])("UsersManager_DeleteUserPermConfirmMultiple","".concat(this.affectedUsersCount,""),"".concat(this.getRoleDisplay(this.roleToChangeTo),""),"".concat(g["Matomo"].helper.htmlEntities((null===(e=this.permissionsForSite)||void 0===e?void 0:e.name)||""),""))},bulkActionAccessLevels:function(){return this.accessLevels.filter((function(e){return"noaccess"!==e.key&&"superuser"!==e.key}))},anonymousAccessLevels:function(){return this.accessLevels.filter((function(e){return"noaccess"===e.key||"view"===e.key}))},onlyRoleAccessLevels:function(){return this.accessLevels.filter((function(e){return"role"===e.type}))}}});Fn.render=Ln;var Hn=Fn,In={class:"usersManager"},qn={key:0},$n={key:1},Gn={class:"row add-user-container"},zn={class:"col s12"},Wn={class:"input-field",style:{"margin-right":"3.5px"}},Yn={key:0,class:"input-field"},Xn={key:0},Jn={class:"resend-invite-confirm-modal modal",ref:"resendInviteConfirmModal"},Kn=Object(o["createElementVNode"])("div",{class:"btn-close modal-close"},[Object(o["createElementVNode"])("i",{class:"icon-close"})],-1),Qn={class:"modal-content"},Zn={class:"modal-title"},es=["innerHTML"],ts={class:"modal-footer"},ns={key:0,class:"success-copied"},ss=Object(o["createElementVNode"])("i",{class:"icon-success"},null,-1),rs={class:"add-existing-user-modal modal",ref:"addExistingUserModal"},os={class:"modal-content"},is={class:"modal-footer"};function as(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("EnrichedHeadline"),l=Object(o["resolveComponent"])("PagedUsersList"),c=Object(o["resolveComponent"])("UserEditForm"),d=Object(o["resolveComponent"])("Field"),u=Object(o["resolveComponent"])("PasswordConfirmation"),m=Object(o["resolveDirective"])("content-intro"),b=Object(o["resolveDirective"])("tooltips");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",In,[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("h2",null,[Object(o["createVNode"])(a,{"help-url":"https://matomo.org/docs/manage-users/","feature-name":"Users Management"},{default:Object(o["withCtx"])((function(){return[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsers")),1)]})),_:1})]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",qn,Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsersDesc")),1)):Object(o["createCommentVNode"])("",!0),"admin"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",$n,Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsersAdminDesc")),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Gn,[Object(o["createElementVNode"])("div",zn,[Object(o["createElementVNode"])("div",Wn,[Object(o["createElementVNode"])("a",{class:"btn add-new-user",onClick:t[0]||(t[0]=function(t){return e.onAddNewUser()})},Object(o["toDisplayString"])(e.translate("UsersManager_InviteNewUser")),1)]),"superuser"!==e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Yn,[Object(o["createElementVNode"])("a",{class:"btn add-existing-user",onClick:t[1]||(t[1]=function(t){return e.showAddExistingUserModal()})},Object(o["toDisplayString"])(e.translate("UsersManager_AddExistingUser")),1)])):Object(o["createCommentVNode"])("",!0)])]),Object(o["createVNode"])(l,{onEditUser:t[2]||(t[2]=function(t){return e.onEditUser(t.user)}),onChangeUserRole:t[3]||(t[3]=function(t){return e.onChangeUserRole(t.users,t.role)}),onDeleteUser:t[4]||(t[4]=function(t){return e.onDeleteUser(t.users,t.password)}),onSearchChange:t[5]||(t[5]=function(t){e.searchParams=t.params,e.fetchUsers()}),onResendInvite:t[6]||(t[6]=function(t){return e.showResendPopup(t.user)}),"initial-site-id":e.initialSiteId,"initial-site-name":e.initialSiteName,"is-loading-users":e.isLoadingUsers,"current-user-role":e.currentUserRole,"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels,"filter-status-levels":e.filterStatusLevels,"search-params":e.searchParams,users:e.users,"total-entries":e.totalEntries},null,8,["initial-site-id","initial-site-name","is-loading-users","current-user-role","access-levels","filter-access-levels","filter-status-levels","search-params","users","total-entries"])],512),[[m]])],512),[[o["vShow"],!e.isEditing]]),e.isEditing?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Xn,[Object(o["createVNode"])(c,{onDone:t[7]||(t[7]=function(t){return e.onDoneEditing(t.isUserModified)}),user:e.userBeingEdited,"current-user-role":e.currentUserRole,"invite-token-expiry-days":e.inviteTokenExpiryDays,"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels,"initial-site-id":e.initialSiteId,"initial-site-name":e.initialSiteName,onResendInvite:t[8]||(t[8]=function(t){return e.showResendPopup(t.user)}),onUpdated:t[9]||(t[9]=function(t){return e.userBeingEdited=t.user})},null,8,["user","current-user-role","invite-token-expiry-days","access-levels","filter-access-levels","initial-site-id","initial-site-name"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Jn,[Kn,Object(o["createElementVNode"])("div",Qn,[Object(o["createElementVNode"])("h2",Zn,Object(o["toDisplayString"])(e.translate("UsersManager_ResendInvite")),1),e.userBeingEdited?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.translate("UsersManager_InviteConfirmMessage",["".concat(e.userBeingEdited.login,""),"".concat(e.userBeingEdited.email,"")]))},null,8,es)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("p",null,[Object(o["createElementVNode"])("strong",null,Object(o["toDisplayString"])(e.translate("UsersManager_InviteActionNotes",e.inviteTokenExpiryDays)),1)])]),Object(o["createElementVNode"])("div",ts,[e.copied?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",ns,[ss,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_LinkCopied")),1)])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("button",{onClick:t[10]||(t[10]=function(t){return e.showInviteActionPasswordConfirm("copy")}),class:"btn btn-copy-link modal-action",style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("UsersManager_CopyLink")),1),Object(o["createElementVNode"])("button",{class:"btn btn-resend modal-action modal-no",onClick:t[11]||(t[11]=function(t){return e.showInviteActionPasswordConfirm("send")})},Object(o["toDisplayString"])(e.translate("UsersManager_ResendInvite")),1)])],512),Object(o["createElementVNode"])("div",rs,[Object(o["createElementVNode"])("div",os,[Object(o["createElementVNode"])("h3",null,Object(o["toDisplayString"])(e.translate("UsersManager_AddExistingUser")),1),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_EnterUsernameOrEmail"))+":",1),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(d,{modelValue:e.addNewUserLoginEmail,"onUpdate:modelValue":t[12]||(t[12]=function(t){return e.addNewUserLoginEmail=t}),name:"add-existing-user-email",uicontrol:"text"},null,8,["modelValue"])])]),Object(o["createElementVNode"])("div",is,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[13]||(t[13]=Object(o["withModifiers"])((function(t){return e.addExistingUser()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Add")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[14]||(t[14]=Object(o["withModifiers"])((function(t){return e.addNewUserLoginEmail=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Cancel")),1)])],512),Object(o["createVNode"])(u,{modelValue:e.showPasswordConfirmationForInviteAction,"onUpdate:modelValue":t[15]||(t[15]=function(t){return e.showPasswordConfirmationForInviteAction=t}),onConfirmed:e.onInviteAction},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])],512)),[[b]])}var ls=20,cs=window,ds=cs.$,us=Object(o["defineComponent"])({props:{currentUserRole:{type:String,required:!0},initialSiteName:{type:String,required:!0},initialSiteId:{type:String,required:!0},accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},filterStatusLevels:{type:Array,required:!0},inviteTokenExpiryDays:{type:String,required:!0}},components:{PasswordConfirmation:f["PasswordConfirmation"],EnrichedHeadline:g["EnrichedHeadline"],PagedUsersList:Hn,UserEditForm:ht,Field:f["Field"]},directives:{ContentIntro:g["ContentIntro"],Tooltips:g["Tooltips"]},data:function(){return{isEditing:!!g["MatomoUrl"].urlParsed.value.showadduser,isCurrentUserSuperUser:!0,users:[],totalEntries:null,searchParams:{offset:0,limit:ls,filter_search:"",filter_access:"",filter_status:"",idSite:this.initialSiteId},isLoadingUsers:!1,userBeingEdited:null,addNewUserLoginEmail:"",copied:!1,loading:!1,showPasswordConfirmationForInviteAction:!1,inviteAction:""}},created:function(){this.fetchUsers()},watch:{limit:function(){this.fetchUsers()}},methods:{showInviteActionPasswordConfirm:function(e){this.loading||(this.showPasswordConfirmationForInviteAction=!0,this.inviteAction=e)},showResendPopup:function(e){this.userBeingEdited=e,ds(this.$refs.resendInviteConfirmModal).modal({dismissible:!1}).modal("open"),this.copied=!1},onInviteAction:function(e){"send"===this.inviteAction?this.onResendInvite(e):this.generateInviteLink(e)},onEditUser:function(e){g["Matomo"].helper.lazyScrollToContent(),this.isEditing=!0,this.userBeingEdited=e},onDoneEditing:function(e){this.isEditing=!1,e&&this.fetchUsers()},showAddExistingUserModal:function(){ds(this.$refs.addExistingUserModal).modal({dismissible:!1}).modal("open")},onChangeUserRole:function(e,t){var n=this;this.isLoadingUsers=!0,Promise.resolve().then((function(){return"all"===e?n.getAllUsersInSearch():e})).then((function(e){return e.filter((function(e){return"superuser"!==e.role})).map((function(e){return e.login}))})).then((function(e){var s,r=n.accessLevels.filter((function(e){return e.key===t})).map((function(e){return e.type}));return s=r.length&&"capability"===r[0]?e.map((function(e){return{method:"UsersManager.addCapabilities",userLogin:e,capabilities:t,idSites:n.searchParams.idSite}})):e.map((function(e){return{method:"UsersManager.setUserAccess",userLogin:e,access:t,idSites:n.searchParams.idSite}})),g["AjaxHelper"].fetch(s,{createErrorNotification:!0})})).catch((function(){})).then((function(){return n.fetchUsers()}))},getAllUsersInSearch:function(){return g["AjaxHelper"].fetch({method:"UsersManager.getUsersPlusRole",filter_search:this.searchParams.filter_search,filter_access:this.searchParams.filter_access,filter_status:this.searchParams.filter_status,idSite:this.searchParams.idSite,filter_limit:"-1"})},onDeleteUser:function(e,t){var n=this;this.isLoadingUsers=!0,Promise.resolve().then((function(){return"all"===e?n.getAllUsersInSearch():e})).then((function(e){return e.map((function(e){return e.login}))})).then((function(e){var n=e.map((function(e){return{method:"UsersManager.deleteUser",userLogin:e,passwordConfirmation:t}}));return g["AjaxHelper"].fetch(n,{createErrorNotification:!0})})).then((function(){g["NotificationsStore"].scrollToNotification(g["NotificationsStore"].show({id:"removeUserSuccess",message:Object(g["translate"])("UsersManager_DeleteSuccess"),context:"success",type:"toast"})),n.fetchUsers()}),(function(){"all"!==e&&e.length>1&&g["NotificationsStore"].show({id:"removeUserSuccess",message:Object(g["translate"])("UsersManager_DeleteNotSuccessful"),context:"warning",type:"toast"}),n.fetchUsers()}))},generateInviteLink:async function(e){if(!this.loading){this.loading=!0;try{var t=await g["AjaxHelper"].post({method:"UsersManager.generateInviteLink"},{userLogin:this.userBeingEdited.login,passwordConfirmation:e});await this.copyToClipboard(t.value)}catch(n){}this.loading=!1}},copyToClipboard:async function(e){try{var t=document.createElement("input");t.style.top="-100px",t.style.left="0",t.style.position="fixed",t.value=e,document.body.appendChild(t),t.select(),"https:"!==window.location.protocol?document.execCommand("copy"):await navigator.clipboard.writeText(t.value),document.body.removeChild(t),this.copied=!0}catch(s){var n=g["NotificationsStore"].show({message:"".concat(Object(g["translate"])("UsersManager_CopyDenied"),"
\n").concat(Object(g["translate"])("UsersManager_CopyDeniedHints",['
'.concat(e,"")])),id:"copyError",context:"error",type:"transient"});g["NotificationsStore"].scrollToNotification(n)}},onResendInvite:function(e){var t=this;""!==e&&g["AjaxHelper"].post({method:"UsersManager.resendInvite",userLogin:this.userBeingEdited.login},{passwordConfirmation:e}).then((function(){t.fetchUsers(),ds(t.$refs.resendInviteConfirmModal).modal("close");var e=g["NotificationsStore"].show({message:Object(g["translate"])("UsersManager_InviteSuccess"),id:"resendInvite",context:"success",type:"transient"});g["NotificationsStore"].scrollToNotification(e)}))},fetchUsers:function(){var e=this;return this.isLoadingUsers=!0,g["AjaxHelper"].fetch(Object.assign(Object.assign({},this.searchParams),{},{method:"UsersManager.getUsersPlusRole"}),{returnResponseObject:!0}).then((function(t){var n=t.getRequestHandle();e.totalEntries=parseInt(n.getResponseHeader("x-matomo-total-results")||"0",10),e.users=n.responseJSON,e.isLoadingUsers=!1})).catch((function(){e.isLoadingUsers=!1}))},addExistingUser:function(){var e=this;return this.isLoadingUsers=!0,g["AjaxHelper"].fetch({method:"UsersManager.userExists",userLogin:this.addNewUserLoginEmail}).then((function(t){return t&&t.value?e.addNewUserLoginEmail:g["AjaxHelper"].fetch({method:"UsersManager.getUserLoginFromUserEmail",userEmail:e.addNewUserLoginEmail}).then((function(e){return e.value}))})).then((function(t){return g["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:t,access:"view",idSites:e.searchParams.idSite})})).then((function(){return e.fetchUsers()})).catch((function(){e.isLoadingUsers=!1}))},onAddNewUser:function(){var e={isAllowed:!0};g["Matomo"].postEvent("UsersManager.initAddUser",e),e&&!e.isAllowed||(this.isEditing=!0,this.userBeingEdited=null)}}});us.render=as;var ms=us,bs={key:0,class:"alert alert-info"},ps={key:1};function gs(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("ContentBlock"),d=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(c,{"content-title":e.title},{default:Object(o["withCtx"])((function(){return[0===e.anonymousSites.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",bs,Object(o["toDisplayString"])(e.translate("UsersManager_NoteNoAnonymousUserAccessSettingsWontBeUsed2")),1)):Object(o["createCommentVNode"])("",!0),e.anonymousSites.length>0?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ps,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"anonymousDefaultReport",modelValue:e.defaultReport,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.defaultReport=t}),introduction:e.translate("UsersManager_WhenUsersAreNotLoggedInAndVisitPiwikTheyShouldAccess"),options:e.defaultReportOptions},null,8,["modelValue","introduction","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"anonymousDefaultReportWebsite",modelValue:e.defaultReportWebsite,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.defaultReportWebsite=t}),options:e.anonymousSites},null,8,["modelValue","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"anonymousDefaultDate",modelValue:e.defaultDate,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.defaultDate=t}),introduction:e.translate("UsersManager_ForAnonymousUsersReportDateToLoadByDefault"),options:e.availableDefaultDates},null,8,["modelValue","introduction","options"])]),Object(o["createVNode"])(l,{saving:e.loading,onConfirm:t[3]||(t[3]=function(t){return e.save()})},null,8,["saving"])],512)),[[d]]):Object(o["createCommentVNode"])("",!0)]})),_:1},8,["content-title"])}var fs=Object(o["defineComponent"])({props:{title:{type:String,required:!0},anonymousSites:{type:Array,required:!0},anonymousDefaultReport:{type:[String,Number],required:!0},anonymousDefaultSite:{type:String,required:!0},anonymousDefaultDate:{type:String,required:!0},availableDefaultDates:{type:Object,required:!0},defaultReportOptions:{type:Object,required:!0}},components:{ContentBlock:g["ContentBlock"],SaveButton:f["SaveButton"],Field:f["Field"]},directives:{Form:f["Form"]},data:function(){return{loading:!1,defaultReport:"".concat(this.anonymousDefaultReport),defaultReportWebsite:this.anonymousDefaultSite,defaultDate:this.anonymousDefaultDate}},methods:{save:function(){var e=this,t={anonymousDefaultReport:"1"===this.defaultReport?this.defaultReportWebsite:this.defaultReport,anonymousDefaultDate:this.defaultDate};this.loading=!0,g["AjaxHelper"].post({module:"UsersManager",action:"recordAnonymousUserSettings",format:"json"},t,{withTokenInUrl:!0}).then((function(){var e=g["NotificationsStore"].show({message:Object(g["translate"])("CoreAdminHome_SettingsSaveSuccess"),id:"anonymousUserSettings",context:"success",type:"transient"});g["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.loading=!1}))}}});fs.render=gs;var hs=fs,Os={id:"newsletterSignup"};function js(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("ContentBlock");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Os,[Object(o["createVNode"])(c,{"content-title":e.translate("UsersManager_NewsletterSignupTitle")},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"checkbox",name:"newsletterSignupCheckbox",id:"newsletterSignupCheckbox",modelValue:e.newsletterSignupCheckbox,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.newsletterSignupCheckbox=t}),"full-width":!0,title:e.signupTitleText},null,8,["modelValue","title"])]),Object(o["createVNode"])(l,{id:"newsletterSignupBtn",onConfirm:t[1]||(t[1]=function(t){return e.signupForNewsletter()}),disabled:!e.newsletterSignupCheckbox,value:e.newsletterSignupButtonTitle,saving:e.isProcessingNewsletterSignup},null,8,["disabled","value","saving"])]})),_:1},8,["content-title"])],512)),[[o["vShow"],e.showNewsletterSignup]])}var vs=Object(o["defineComponent"])({data:function(){return{showNewsletterSignup:!0,newsletterSignupCheckbox:!1,isProcessingNewsletterSignup:!1,newsletterSignupButtonTitle:Object(g["translate"])("General_Save")}},components:{ContentBlock:g["ContentBlock"],SaveButton:f["SaveButton"],Field:f["Field"]},computed:{signupTitleText:function(){return Object(g["translate"])("UsersManager_NewsletterSignupMessage",'',"")}},methods:{signupForNewsletter:function(){var e=this;this.newsletterSignupButtonTitle=Object(g["translate"])("General_Loading"),this.isProcessingNewsletterSignup=!0,g["AjaxHelper"].fetch({module:"API",method:"UsersManager.newsletterSignup"},{withTokenInUrl:!0}).then((function(){e.isProcessingNewsletterSignup=!1,e.showNewsletterSignup=!1;var t=g["NotificationsStore"].show({message:Object(g["translate"])("UsersManager_NewsletterSignupSuccessMessage"),id:"newslettersignup",context:"success",type:"transient"});g["NotificationsStore"].scrollToNotification(t)})).catch((function(){e.isProcessingNewsletterSignup=!1;var t=g["NotificationsStore"].show({message:Object(g["translate"])("UsersManager_NewsletterSignupFailureMessage"),id:"newslettersignup",context:"error",type:"transient"});g["NotificationsStore"].scrollToNotification(t),e.newsletterSignupButtonTitle=Object(g["translate"])("General_PleaseTryAgain")}))}}});vs.render=js;var Cs=vs,ys={id:"userSettingsTable"},ks={key:0},Ns={id:"languageHelp",class:"inline-help-node"},Ss={target:"_blank",rel:"noreferrer noopener",href:"https://matomo.org/translations/"},Vs={class:"sites_autocomplete"};function Us(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SiteSelector"),c=Object(o["resolveComponent"])("SaveButton"),d=Object(o["resolveComponent"])("PasswordConfirmation"),u=Object(o["resolveComponent"])("ContentBlock"),m=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(u,{"content-title":e.title,feature:"true"},{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("form",ys,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"text",name:"username",title:e.translate("General_Username"),disabled:!0,modelValue:e.username,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.username=t}),"inline-help":e.translate("UsersManager_YourUsernameCannotBeChanged")},null,8,["title","modelValue","inline-help"])]),e.isUsersAdminEnabled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ks,[Object(o["createVNode"])(a,{uicontrol:"text",name:"email","model-value":e.email,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.email=t,e.doesRequirePasswordConfirmation=!0}),maxlength:100,title:e.translate("UsersManager_Email")},null,8,["model-value","title"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Ns,[Object(o["createElementVNode"])("a",Ss,Object(o["toDisplayString"])(e.translate("LanguagesManager_AboutPiwikTranslations")),1)]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"language",modelValue:e.language,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.language=t}),title:e.translate("General_Language"),options:e.languageOptions,"inline-help":"#languageHelp"},null,8,["modelValue","title","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"timeformat",modelValue:e.timeformat,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.timeformat=t}),title:e.translate("General_TimeFormat"),options:e.timeFormats},null,8,["modelValue","title","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"defaultReport",modelValue:e.theDefaultReport,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.theDefaultReport=t}),introduction:e.translate("UsersManager_ReportToLoadByDefault"),title:e.translate("General_AllWebsitesDashboard"),options:e.defaultReportOptions},null,8,["modelValue","introduction","title","options"])]),Object(o["createElementVNode"])("div",Vs,[Object(o["createVNode"])(l,{modelValue:e.site,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.site=t}),"show-selected-site":!0,"switch-site-on-select":!1,"show-all-sites-item":!1,showselectedsite:!0,id:"defaultReportSiteSelector"},null,8,["modelValue"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"defaultDate",modelValue:e.theDefaultDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.theDefaultDate=t}),introduction:e.translate("UsersManager_ReportDateToLoadByDefault"),options:e.availableDefaultDates},null,8,["modelValue","introduction","options"])]),Object(o["createVNode"])(c,{onConfirm:t[7]||(t[7]=function(t){return e.save()}),saving:e.loading},null,8,["saving"]),Object(o["createVNode"])(d,{modelValue:e.showPasswordConfirmation,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.showPasswordConfirmation=t}),onConfirmed:e.doSave},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])],512),[[m]])]})),_:1},8,["content-title"])}var Es=Object(o["defineComponent"])({props:{isUsersAdminEnabled:{type:Boolean,required:!0},title:{type:String,required:!0},userLogin:{type:String,required:!0},userEmail:{type:String,required:!0},currentLanguageCode:{type:String,required:!0},languageOptions:{type:Object,required:!0},currentTimeformat:{type:Number,required:!0},timeFormats:{type:Object,required:!0},defaultReport:{type:[String,Number],required:!0},defaultReportOptions:{type:Object,required:!0},defaultReportIdSite:{type:[String,Number],required:!0},defaultReportSiteName:{type:String,required:!0},defaultDate:{type:String,required:!0},availableDefaultDates:{type:Object,required:!0}},components:{ContentBlock:g["ContentBlock"],SaveButton:f["SaveButton"],Field:f["Field"],SiteSelector:g["SiteSelector"],PasswordConfirmation:f["PasswordConfirmation"]},directives:{Form:f["Form"]},data:function(){return{doesRequirePasswordConfirmation:!1,username:this.userLogin,email:this.userEmail,language:this.currentLanguageCode,timeformat:this.currentTimeformat,theDefaultReport:this.defaultReport,site:{id:this.defaultReportIdSite,name:g["Matomo"].helper.htmlDecode(this.defaultReportSiteName)},theDefaultDate:this.defaultDate,loading:!1,showPasswordConfirmation:!1}},methods:{save:function(){this.doesRequirePasswordConfirmation?this.showPasswordConfirmation=!0:this.doSave()},doSave:function(e){var t=this,n={email:this.email,defaultReport:"MultiSites"===this.theDefaultReport?this.theDefaultReport:this.site.id,defaultDate:this.theDefaultDate,language:this.language,timeformat:this.timeformat};e&&(n.passwordConfirmation=e),this.loading=!0,g["AjaxHelper"].post({module:"UsersManager",action:"recordUserSettings",format:"json"},n,{withTokenInUrl:!0}).then((function(){var e=g["NotificationsStore"].show({message:Object(g["translate"])("CoreAdminHome_SettingsSaveSuccess"),id:"PersonalSettingsSuccess",context:"success",type:"transient"});g["NotificationsStore"].scrollToNotification(e),t.doesRequirePasswordConfirmation=!1,t.loading=!1})).catch((function(){t.loading=!1}))}}});Es.render=Us;var ws=Es,As={key:0},Ts={key:1,class:"alert alert-danger"},Ms=["action"],Bs=["value"],_s=["value"],Ds=["innerHTML"];function xs(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("ContentBlock");return Object(o["openBlock"])(),Object(o["createBlock"])(l,{"content-title":e.translate("UsersManager_AuthTokens")},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_TokenAuthIntro")),1),e.noDescription?(Object(o["openBlock"])(),Object(o["createElementBlock"])("br",As)):Object(o["createCommentVNode"])("",!0),e.noDescription?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ts,Object(o["toDisplayString"])(e.translate("General_Description"))+": "+Object(o["toDisplayString"])(e.translate("General_ValidatorErrorEmptyValue")),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("form",{action:e.addNewTokenFormUrl,method:"post",class:"addTokenForm"},[Object(o["createVNode"])(a,{uicontrol:"text",name:"description",title:e.translate("General_Description"),maxlength:100,required:!0,"inline-help":e.translate("UsersManager_AuthTokenPurpose"),modelValue:e.tokenDescription,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.tokenDescription=t})},null,8,["title","inline-help","modelValue"]),Object(o["createVNode"])(a,{uicontrol:"checkbox",name:"secure_only",title:e.translate("UsersManager_OnlyAllowPostRequests"),required:!1,"inline-help":e.postOnlyHelp,modelValue:e.tokenPostOnly,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.tokenPostOnly=t}),disabled:e.forcePostOnlyCalc},null,8,["title","inline-help","modelValue","disabled"]),Object(o["createElementVNode"])("input",{type:"hidden",value:e.formNonce,name:"nonce"},null,8,Bs),Object(o["createElementVNode"])("input",{type:"submit",value:e.translate("UsersManager_CreateNewToken"),class:"btn",style:{"margin-right":"3.5px"}},null,8,_s),Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.cancelLink)},null,8,Ds)],8,Ms)]})),_:1},8,["content-title"])}var Ls=Object(o["defineComponent"])({props:{formNonce:String,noDescription:Boolean,forcePostOnly:Boolean},components:{ContentBlock:g["ContentBlock"],Field:f["Field"]},data:function(){return{tokenDescription:"",tokenPostOnly:!0}},computed:{addNewTokenFormUrl:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"addNewToken"})))},cancelLink:function(){var e="?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"userSecurity"})));return Object(g["translate"])("General_OrCancel",""),"")},forcePostOnlyCalc:function(){return this.forcePostOnly},postOnlyHelp:function(){return this.forcePostOnly?Object(g["translate"])("UsersManager_AuthTokenSecureOnlyHelpForced"):Object(g["translate"])("UsersManager_AuthTokenSecureOnlyHelp")}}});Ls.render=xs;var Rs=Ls,Ps=Object(o["createElementVNode"])("br",null,null,-1),Fs={style:{"font-size":"40px"},class:"generatedTokenAuth"},Hs=["href"];function Is(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("ContentBlock"),l=Object(o["resolveDirective"])("copy-to-clipboard");return Object(o["openBlock"])(),Object(o["createBlock"])(a,{"content-title":e.translate("UsersManager_TokenSuccessfullyGenerated")},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("p",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_PleaseStoreToken"))+" ",1),Ps,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_DoNotStoreToken")),1)]),Object(o["createElementVNode"])("div",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("pre",Fs,[Object(o["createElementVNode"])("code",null,Object(o["toDisplayString"])(e.generatedToken),1)],512),[[l,{}]])]),Object(o["createElementVNode"])("a",{href:e.userSecurityLink,class:"btn",style:{height:"auto"}},Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmTokenCopied"))+" "+Object(o["toDisplayString"])(e.translate("UsersManager_GoBackSecurityPage")),9,Hs)]})),_:1},8,["content-title"])}var qs=Object(o["defineComponent"])({props:{generatedToken:{type:String,required:!0}},components:{ContentBlock:g["ContentBlock"]},directives:{CopyToClipboard:g["CopyToClipboard"]},computed:{userSecurityLink:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"userSecurity"})))}}});qs.render=Is;var $s=qs,Gs=["action"],zs=["value"],Ws={key:0},Ys={class:"alert alert-info"},Xs=["value"],Js={key:1},Ks={class:"alert alert-danger"},Qs=["innerHTML"],Zs={ref:"afterPassword"},er=Object(o["createElementVNode"])("a",{name:"authtokens",id:"authtokens"},null,-1),tr={key:0},nr={class:"listAuthTokens"},sr=["title"],rr={key:0},or=["colspan","innerHTML"],ir={class:"creationDate"},ar=["title"],lr=["action"],cr=["value"],dr=["value"],ur=["title"],mr=Object(o["createElementVNode"])("span",{class:"icon-delete"},null,-1),br=[mr],pr={class:"tableActionBar"},gr=["href"],fr=Object(o["createElementVNode"])("span",{class:"icon-add"},null,-1),hr=["action"],Or=["value"],jr=Object(o["createElementVNode"])("input",{name:"idtokenauth",type:"hidden",value:"all"},null,-1),vr={type:"submit",class:"table-action"},Cr=Object(o["createElementVNode"])("span",{class:"icon-delete"},null,-1);function yr(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("ContentBlock"),c=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[e.isUsersAdminEnabled?(Object(o["openBlock"])(),Object(o["createBlock"])(l,{key:0,"content-title":e.translate("General_ChangePassword"),feature:"true"},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("form",{id:"userSettingsTable",method:"post",action:e.recordPasswordChangeAction},[Object(o["createElementVNode"])("input",{type:"hidden",value:e.changePasswordNonce,name:"nonce"},null,8,zs),e.isValidHost?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ws,[Object(o["createVNode"])(a,{uicontrol:"password",name:"password",autocomplete:!1,modelValue:e.password,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.password=t}),title:e.translate("Login_NewPassword"),"inline-help":e.translate("UsersManager_IfYouWouldLikeToChangeThePasswordTypeANewOne")},null,8,["modelValue","title","inline-help"]),Object(o["createVNode"])(a,{uicontrol:"password",name:"passwordBis",autocomplete:!1,modelValue:e.passwordBis,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.passwordBis=t}),title:e.translate("Login_NewPasswordRepeat"),"inline-help":e.translate("UsersManager_TypeYourPasswordAgain")},null,8,["modelValue","title","inline-help"]),Object(o["createVNode"])(a,{uicontrol:"password",name:"passwordConfirmation",autocomplete:!1,modelValue:e.passwordConfirmation,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.passwordConfirmation=t}),title:e.translate("UsersManager_YourCurrentPassword"),"inline-help":e.translate("UsersManager_TypeYourCurrentPassword")},null,8,["modelValue","title","inline-help"]),Object(o["createElementVNode"])("div",Ys,Object(o["toDisplayString"])(e.translate("UsersManager_PasswordChangeTerminatesOtherSessions")),1),Object(o["createElementVNode"])("input",{type:"submit",value:e.translate("General_Save"),class:"btn"},null,8,Xs)])):Object(o["createCommentVNode"])("",!0),e.isValidHost?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Js,[Object(o["createElementVNode"])("div",Ks,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_InjectedHostCannotChangePwd",e.invalidHost))+" ",1),e.isSuperUser?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.emailYourAdminText)},null,8,Qs))])]))],8,Gs)]})),_:1},8,["content-title"])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Zs,[e.isUsersAdminEnabled&&e.afterPasswordComponent?(Object(o["openBlock"])(),Object(o["createBlock"])(Object(o["resolveDynamicComponent"])(e.afterPasswordComponent),{key:0})):Object(o["createCommentVNode"])("",!0)],512),er,Object(o["createVNode"])(l,{"content-title":e.translate("UsersManager_AuthTokens")},{default:Object(o["withCtx"])((function(){var t,n;return[Object(o["createElementVNode"])("p",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_TokenAuthIntro"))+" ",1),e.hasTokensWithExpireDate?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",tr,Object(o["toDisplayString"])(e.translate("UsersManager_ExpiredTokensDeleteAutomatically")),1)):Object(o["createCommentVNode"])("",!0)]),Object(o["withDirectives"])(Object(o["createElementVNode"])("table",nr,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_CreationDate")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_Description")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("UsersManager_LastUsed")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("UsersManager_PostOnly")),1),e.hasTokensWithExpireDate?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:0,title:e.translate("UsersManager_TokensWithExpireDateCreationBySystem")},Object(o["toDisplayString"])(e.translate("UsersManager_ExpireDate")),9,sr)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_Actions")),1)])]),Object(o["createElementVNode"])("tbody",null,[null!==(t=e.tokens)&&void 0!==t&&t.length?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",rr,[Object(o["createElementVNode"])("td",{colspan:e.hasTokensWithExpireDate?5:4,innerHTML:e.$sanitize(e.noTokenCreatedYetText)},null,8,or)])),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.tokens||[],(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:t.idusertokenauth},[Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("span",ir,Object(o["toDisplayString"])(t.date_created),1)]),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(t.description),1),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(t.last_used?t.last_used:e.translate("General_Never")),1),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(1===parseInt(t.secure_only,10)?e.translate("General_Yes"):e.translate("General_No")),1),e.hasTokensWithExpireDate?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",{key:0,title:e.translate("UsersManager_TokensWithExpireDateCreationBySystem")},Object(o["toDisplayString"])(t.date_expired?t.date_expired:e.translate("General_Never")),9,ar)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("form",{method:"post",action:e.deleteTokenAction,style:{display:"inline"}},[Object(o["createElementVNode"])("input",{name:"nonce",type:"hidden",value:e.deleteTokenNonce},null,8,cr),Object(o["createElementVNode"])("input",{name:"idtokenauth",type:"hidden",value:t.idusertokenauth},null,8,dr),Object(o["createElementVNode"])("button",{type:"submit",class:"table-action",title:e.translate("General_Delete")},br,8,ur)],8,lr)])])})),128))])],512),[[c]]),Object(o["createElementVNode"])("div",pr,[Object(o["createElementVNode"])("a",{href:e.addNewTokenLink,class:"addNewToken"},[fr,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_CreateNewToken")),1)],8,gr),null!==(n=e.tokens)&&void 0!==n&&n.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("form",{key:0,method:"post",action:e.deleteTokenAction,style:{display:"inline"}},[Object(o["createElementVNode"])("input",{name:"nonce",type:"hidden",value:e.deleteTokenNonce},null,8,Or),jr,Object(o["createElementVNode"])("button",vr,[Cr,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_DeleteAllTokens")),1)])],8,hr)):Object(o["createCommentVNode"])("",!0)])]})),_:1},8,["content-title"])])}var kr=Object(o["defineComponent"])({props:{deleteTokenNonce:String,tokens:Array,hasTokensWithExpireDate:Boolean,isUsersAdminEnabled:Boolean,changePasswordNonce:String,isValidHost:Boolean,isSuperUser:Boolean,invalidHost:String,afterPasswordEventContent:String,invalidHostMailLinkStart:String},components:{ContentBlock:g["ContentBlock"],Field:f["Field"]},directives:{ContentTable:g["ContentTable"]},data:function(){return{password:"",passwordBis:"",passwordConfirmation:""}},mounted:function(){var e=this.$refs.afterPassword;g["Matomo"].helper.compileVueEntryComponents(e)},computed:{recordPasswordChangeAction:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"recordPasswordChange"})))},emailYourAdminText:function(){return Object(g["translate"])("UsersManager_EmailYourAdministrator",this.invalidHostMailLinkStart||"","")},noTokenCreatedYetText:function(){var e="?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"addNewToken"})));return Object(g["translate"])("UsersManager_NoTokenCreatedYetCreateNow",''),"")},deleteTokenAction:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"deleteToken"})))},addNewTokenLink:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"addNewToken"})))},afterPasswordComponent:function(){if(!this.afterPasswordEventContent)return null;var e=this.$refs.afterPassword;return Object(o["markRaw"])({template:this.afterPasswordEventContent,beforeUnmount:function(){g["Matomo"].helper.destroyVueComponent(e)}})}}});kr.render=yr;var Nr=kr,Sr=["innerHTML"],Vr={style:{"margin-left":"20px"}},Ur=["href"],Er=Object(o["createElementVNode"])("br",null,null,-1);function wr(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("PersonalSettings"),l=Object(o["resolveComponent"])("NewsletterSettings"),c=Object(o["resolveComponent"])("PluginSettings"),d=Object(o["resolveComponent"])("ContentBlock");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[Object(o["createVNode"])(a,{"is-users-admin-enabled":e.isUsersAdminEnabled,title:e.title,"user-login":e.userLogin,"user-email":e.userEmail,"current-language-code":e.currentLanguageCode,"language-options":e.languageOptions,"current-timeformat":e.currentTimeformat,"time-formats":e.timeFormats,"default-report":e.defaultReport,"default-report-options":e.defaultReportOptions,"default-report-id-site":e.defaultReportIdSite,"default-report-site-name":e.defaultReportSiteName,"default-date":e.defaultDate,"available-default-dates":e.availableDefaultDates},null,8,["is-users-admin-enabled","title","user-login","user-email","current-language-code","language-options","current-timeformat","time-formats","default-report","default-report-options","default-report-id-site","default-report-site-name","default-date","available-default-dates"]),e.showNewsletterSignup?(Object(o["openBlock"])(),Object(o["createBlock"])(l,{key:0})):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(c,{mode:"user"}),Object(o["createVNode"])(d,{"content-title":e.translate("UsersManager_ExcludeVisitsViaCookie")},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("p",{innerHTML:e.$sanitize(e.yourVisitsAreText)},null,8,Sr),Object(o["createElementVNode"])("span",Vr,[Object(o["createElementVNode"])("a",{href:e.setIgnoreCookieLink},[Object(o["createTextVNode"])(" › "+Object(o["toDisplayString"])(e.ignoreCookieSet?e.translate("UsersManager_ClickHereToDeleteTheCookie"):e.translate("UsersManager_ClickHereToSetTheCookieOnDomain",e.piwikHost))+" ",1),Er],8,Ur)])]})),_:1},8,["content-title"])])}var Ar=Object(o["defineComponent"])({props:{isUsersAdminEnabled:{type:Boolean,required:!0},title:{type:String,required:!0},userLogin:{type:String,required:!0},userEmail:{type:String,required:!0},currentLanguageCode:{type:String,required:!0},languageOptions:{type:Object,required:!0},currentTimeformat:{type:Number,required:!0},timeFormats:{type:Object,required:!0},defaultReport:{type:[String,Number],required:!0},defaultReportOptions:{type:Object,required:!0},defaultReportIdSite:{type:[String,Number],required:!0},defaultReportSiteName:{type:String,required:!0},defaultDate:{type:String,required:!0},availableDefaultDates:{type:Object,required:!0},showNewsletterSignup:Boolean,ignoreCookieSet:Boolean,ignoreSalt:[String,Number,Boolean],piwikHost:{type:String,required:!0}},components:{ContentBlock:g["ContentBlock"],PersonalSettings:ws,NewsletterSettings:Cs,PluginSettings:f["PluginSettings"]},computed:{yourVisitsAreText:function(){return this.ignoreCookieSet?Object(g["translate"])("UsersManager_YourVisitsAreIgnoredOnDomain","",this.piwikHost,""):Object(g["translate"])("UsersManager_YourVisitsAreNotIgnored","","")},setIgnoreCookieLink:function(){return"?".concat(g["MatomoUrl"].stringify({ignoreSalt:this.ignoreSalt,module:"UsersManager",action:"setIgnoreCookie"}),"#excludeCookie")}}});Ar.render=wr;var Tr=Ar; + */var C=function(){function e(){var t=this;h(this,e),v(this,"privateState",Object(o["reactive"])({isLoading:!1,capabilities:[]})),v(this,"state",Object(o["computed"])((function(){return Object(o["readonly"])(t.privateState)}))),v(this,"capabilities",Object(o["computed"])((function(){return t.state.value.capabilities}))),v(this,"isLoading",Object(o["computed"])((function(){return t.state.value.isLoading}))),v(this,"fetchPromise",void 0)}return j(e,[{key:"init",value:function(){return this.fetchCapabilities()}},{key:"fetchCapabilities",value:function(){var e=this;return this.fetchPromise||(this.privateState.isLoading=!0,this.fetchPromise=g["AjaxHelper"].fetch({method:"UsersManager.getAvailableCapabilities"}).then((function(t){return e.privateState.capabilities=t,e.capabilities.value})).finally((function(){e.privateState.isLoading=!1}))),this.fetchPromise}}]),e}(),y=new C,k=window,N=k.$,S=Object(o["defineComponent"])({props:{idsite:[String,Number],siteName:{type:String,required:!0},userLogin:{type:String,required:!0},userRole:{type:String,required:!0},capabilities:Array},components:{Field:f["Field"]},data:function(){return{theCapabilities:this.capabilities||[],isBusy:!1,isAddingCapability:!1,capabilityToAddId:null,capabilityToRemoveId:null,capabilityToAddOrRemove:null}},emits:["change"],watch:{capabilities:function(e){e&&(this.theCapabilities=e)}},created:function(){var e=this;y.init(),this.capabilities?this.theCapabilities=this.capabilities:(this.isBusy=!0,g["AjaxHelper"].fetch({method:"UsersManager.getUsersPlusRole",limit:"1",filter_search:this.userLogin}).then((function(e){return e&&e.capabilities?e.capabilities:[]})).then((function(t){e.theCapabilities=t})).finally((function(){e.isBusy=!1})))},methods:{onToggleCapability:function(e){var t=this;this.isAddingCapability=e;var n=e?this.capabilityToAddId:this.capabilityToRemoveId;this.capabilityToAddOrRemove=null,this.availableCapabilities.forEach((function(e){e.id===n&&(t.capabilityToAddOrRemove=e)})),this.$refs.confirmCapabilityToggleModal&&N(this.$refs.confirmCapabilityToggleModal).modal({dismissible:!1,yes:function(){return null}}).modal("open")},toggleCapability:function(){this.isAddingCapability?this.addCapability(this.capabilityToAddOrRemove):this.removeCapability(this.capabilityToAddOrRemove)},isIncludedInRole:function(e){return-1!==(e.includedInRoles||[]).indexOf(this.userRole)},getCapabilitiesList:function(){var e=this,t=[];return this.availableCapabilities.forEach((function(n){e.isIncludedInRole(n)||e.capabilitiesSet[n.id]&&t.push(n.id)})),t},addCapability:function(e){var t=this;this.isBusy=!0,g["AjaxHelper"].post({method:"UsersManager.addCapabilities"},{userLogin:this.userLogin,capabilities:e.id,idSites:this.idsite}).then((function(){t.$emit("change",t.getCapabilitiesList())})).finally((function(){t.isBusy=!1,t.capabilityToAddOrRemove=null,t.capabilityToAddId=null,t.capabilityToRemoveId=null}))},removeCapability:function(e){var t=this;this.isBusy=!0,g["AjaxHelper"].post({method:"UsersManager.removeCapabilities"},{userLogin:this.userLogin,capabilities:e.id,idSites:this.idsite}).then((function(){t.$emit("change",t.getCapabilitiesList())})).finally((function(){t.isBusy=!1,t.capabilityToAddOrRemove=null,t.capabilityToAddId=null,t.capabilityToRemoveId=null}))}},computed:{availableCapabilities:function(){return y.capabilities.value},confirmAddCapabilityToggleContent:function(){return Object(g["translate"])("UsersManager_AreYouSureAddCapability","".concat(this.userLogin,""),"".concat(this.capabilityToAddOrRemove?this.capabilityToAddOrRemove.name:"",""),"".concat(this.siteNameText,""))},confirmCapabilityToggleContent:function(){return Object(g["translate"])("UsersManager_AreYouSureRemoveCapability","".concat(this.capabilityToAddOrRemove?this.capabilityToAddOrRemove.name:"",""),"".concat(this.userLogin,""),"".concat(this.siteNameText,""))},siteNameText:function(){return g["Matomo"].helper.htmlEntities(this.siteName)},availableCapabilitiesGrouped:function(){var e=this,t=this.availableCapabilities.filter((function(t){return!e.capabilitiesSet[t.id]})).map((function(e){return{group:e.category,key:e.id,value:e.name,tooltip:e.description}}));return t.sort((function(e,t){return e.group===t.group?e.value===t.value?0:e.valuee.limit?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",q,[Object(o["createElementVNode"])("div",$,[Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["prev",{disabled:e.offset<=0}])},[Object(o["createElementVNode"])("span",{class:"pointer",onClick:t[6]||(t[6]=function(t){return e.gotoPreviousPage()})},"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],2),Object(o["createElementVNode"])("span",G,[Object(o["createElementVNode"])("span",{textContent:Object(o["toDisplayString"])(e.paginationText)},null,8,z)]),Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["next",{disabled:e.offset+e.limit>=e.totalEntries}])},[Object(o["createElementVNode"])("span",{class:"pointer",onClick:t[7]||(t[7]=function(t){return e.gotoNextPage()})},Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],2)])])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",W,[e.isRoleHelpToggled?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.rolesHelpText)},null,8,Y)]})),_:1})):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",X,[e.isCapabilitiesHelpToggled?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.translate("UsersManager_CapabilitiesHelp")),1)]})),_:1})):Object(o["createCommentVNode"])("",!0)]),Object(o["withDirectives"])(Object(o["createElementVNode"])("table",J,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",K,[Object(o["createElementVNode"])("span",Q,[Object(o["createElementVNode"])("label",null,[Object(o["createElementVNode"])("input",{type:"checkbox",id:"perm_edit_select_all",checked:e.isAllCheckboxSelected,onChange:t[8]||(t[8]=function(t){return e.onAllCheckboxChange(t)})},null,40,Z),ee])])]),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_Name")),1),Object(o["createElementVNode"])("th",te,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize("".concat(e.translate("UsersManager_Role")," "))},null,8,ne),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isRoleHelpToggled}]),onClick:t[9]||(t[9]=Object(o["withModifiers"])((function(t){return e.isRoleHelpToggled=!e.isRoleHelpToggled}),["prevent"]))},re,2)]),Object(o["createElementVNode"])("th",oe,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize("".concat(e.translate("UsersManager_Capabilities")," "))},null,8,ie),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isCapabilitiesHelpToggled}]),onClick:t[10]||(t[10]=Object(o["withModifiers"])((function(t){return e.isCapabilitiesHelpToggled=!e.isCapabilitiesHelpToggled}),["prevent"]))},le,2)])])]),Object(o["createElementVNode"])("tbody",null,[e.isAllCheckboxSelected&&e.siteAccess.length=(this.totalEntries||0)||(this.offset=e,this.fetchAccess())},showRemoveAccessConfirm:function(){Re(this.$refs.deleteAccessConfirmModal).modal({dismissible:!1}).modal("open")},changeUserRole:function(){var e=this,t=function(){var t=[];return Object.keys(e.selectedRows).forEach((function(n){e.selectedRows[n]&&e.siteAccess[n]&&t.push(e.siteAccess[n].idsite)})),t},n=function(){return g["AjaxHelper"].fetch({method:"UsersManager.getSitesAccessForUser",filter_search:e.siteNameFilter,filter_access:e.accessLevelFilter,userLogin:e.userLogin,filter_limit:"-1"}).then((function(e){return e.map((function(e){return e.idsite}))}))};return this.isLoadingAccess=!0,Promise.resolve().then((function(){return e.siteAccessToChange?[e.siteAccessToChange.idsite]:e.areAllResultsSelected?n():t()})).then((function(t){return g["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:e.userLogin,access:e.roleToChangeTo,idSites:t})})).catch((function(){})).then((function(){return e.$emit("accessChanged"),e.fetchAccess()}))},showChangeAccessConfirm:function(){var e=this;Re(this.$refs.changeAccessConfirmModal).modal({dismissible:!1,onCloseEnd:function(){e.accessChangeEvent=null}}).modal("open")},getRoleDisplay:function(e){var t=null;return this.filteredAccessLevels.forEach((function(n){n.key===e&&(t=n.value)})),t},giveAccessToAllSites:function(){var e=this;this.isGivingAccessToAllSites=!0,g["AjaxHelper"].fetch({method:"SitesManager.getSitesWithAdminAccess",filter_limit:-1}).then((function(t){var n=t.map((function(e){return e.idsite}));return g["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:e.userLogin,access:e.allWebsitesAccssLevelSet,idSites:n})})).then((function(){return e.fetchAccess()})).finally((function(){e.isGivingAccessToAllSites=!1}))},showChangeAccessAllSitesModal:function(){Re(this.$refs.confirmGiveAccessAllSitesModal).modal({dismissible:!1}).modal("open")},onChangeSiteFilter:function(e){var t=this;setTimeout((function(){var n=e.target.value;t.siteNameFilter!==n&&(t.siteNameFilter=n,t.offset=0,t.fetchAccess())}))},onRoleChange:function(e,t){this.siteAccessToChange=e,this.roleToChangeTo=t.value,this.accessChangeEvent=t,this.showChangeAccessConfirm()}},computed:{rolesHelpText:function(){return Object(g["translate"])("UsersManager_RolesHelp",'',"",'',"")},theDisplayedWebsitesAreSelectedText:function(){var e=Object(g["translate"])("UsersManager_TheDisplayedWebsitesAreSelected","".concat(this.siteAccess.length,""));return"".concat(e," ")},clickToSelectAllText:function(){return Object(g["translate"])("UsersManager_ClickToSelectAll","".concat(this.totalEntries,""))},allWebsitesAreSelectedText:function(){return Object(g["translate"])("UsersManager_AllWebsitesAreSelected","".concat(this.totalEntries,""))},clickToSelectDisplayedWebsitesText:function(){return Object(g["translate"])("UsersManager_ClickToSelectDisplayedWebsites","".concat(this.siteAccess.length,""))},deletePermConfirmSingleText:function(){return Object(g["translate"])("UsersManager_DeletePermConfirmSingle","".concat(this.userLogin,""),"".concat(this.siteAccessToChangeName,""))},deletePermConfirmMultipleText:function(){return Object(g["translate"])("UsersManager_DeletePermConfirmMultiple","".concat(this.userLogin,""),"".concat(this.affectedSitesCount,""))},changePermToSiteConfirmSingleText:function(){return Object(g["translate"])("UsersManager_ChangePermToSiteConfirmSingle","".concat(this.userLogin,""),"".concat(this.siteAccessToChangeName,""),"".concat(this.getRoleDisplay(this.roleToChangeTo),""))},changePermToSiteConfirmMultipleText:function(){return Object(g["translate"])("UsersManager_ChangePermToSiteConfirmMultiple","".concat(this.userLogin,""),"".concat(this.affectedSitesCount,""),"".concat(this.getRoleDisplay(this.roleToChangeTo),""))},changePermToAllSitesConfirmText:function(){return Object(g["translate"])("UsersManager_ChangePermToAllSitesConfirm","".concat(this.userLogin,""),"".concat(this.getRoleDisplay(this.allWebsitesAccssLevelSet),""))},paginationLowerBound:function(){return this.offset+1},paginationUpperBound:function(){return this.totalEntries?Math.min(this.offset+this.limit,this.totalEntries):"?"},filteredAccessLevels:function(){return this.accessLevels.filter((function(e){return"superuser"!==e.key&&"role"===e.type}))},filteredSelectAccessLevels:function(){return this.filterAccessLevels.filter((function(e){return"superuser"!==e.key}))},selectedRowsCount:function(){var e=0;return Object.values(this.selectedRows).forEach((function(t){t&&(e+=1)})),e},affectedSitesCount:function(){return this.areAllResultsSelected?this.totalEntries:this.selectedRowsCount},allPropsWatch:function(){return this.userLogin,this.limit,this.accessLevels,this.filterAccessLevels,Date.now()},siteAccessToChangeName:function(){return this.siteAccessToChange?g["Matomo"].helper.htmlEntities(this.siteAccessToChange.site_name):""},paginationText:function(){var e=Object(g["translate"])("General_Pagination","".concat(this.paginationLowerBound),"".concat(this.paginationUpperBound),"".concat(this.totalEntries));return" ".concat(e," ")}}});Pe.render=xe;var Fe=Pe,He={class:"row"},Ie={key:0,class:"col s12 m6 invite-notes"},qe={class:"form-help"},$e=["innerHTML"],Ge={key:1,class:"col m2 entityList"},ze={class:"listCircle"},We={key:0,class:"icon-warning"},Ye=Object(o["createElementVNode"])("div",{class:"save-button-spacer hide-on-small-only"},null,-1),Xe={href:"",class:"entityCancelLink"},Je=Object(o["createElementVNode"])("span",{class:"icon-arrow-left"},"  ",-1),Ke={class:"visibleTab col m10"},Qe={key:0,class:"basic-info-tab"},Ze={class:"form-group row",style:{position:"relative"}},et={class:"col s12 m6 save-button"},tt={key:0,class:"resend-notes"},nt=["innerHTML"],st={key:0,class:"entityCancel"},rt=Object(o["createElementVNode"])("span",{class:"icon icon-arrow-left"},"  ",-1),ot={key:1,class:"user-permissions"},it={key:0},at={key:1,class:"alert alert-info"},lt={key:2,class:"superuser-access form-group"},ct={key:0},dt={key:1},ut={key:3,class:"twofa-reset form-group"},mt={class:"resetTwoFa"},bt=["innerHTML"];function pt(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("PasswordConfirmation"),d=Object(o["resolveComponent"])("UserPermissionsEdit"),u=Object(o["resolveComponent"])("ContentBlock"),m=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(u,{class:Object(o["normalizeClass"])(["userEditForm",{loading:e.isSavingUserInfo}]),"content-title":"".concat(e.formTitle," ").concat(e.isAdd?"":"".concat(e.theUser.login))},{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",He,[e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ie,[Object(o["createElementVNode"])("div",qe,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_InviteSuccessNotification",[e.inviteTokenExpiryDays]))},null,8,$e)])])):Object(o["createCommentVNode"])("",!0),e.isAdd?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ge,[Object(o["createElementVNode"])("ul",ze,[Object(o["createElementVNode"])("li",{class:Object(o["normalizeClass"])([{active:"basic"===e.activeTab},"menuBasicInfo"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[0]||(t[0]=Object(o["withModifiers"])((function(t){return e.activeTab="basic"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_BasicInformation")),1)],2),Object(o["createElementVNode"])("li",{class:Object(o["normalizeClass"])([{active:"permissions"===e.activeTab},"menuPermissions"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.activeTab="permissions"}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("UsersManager_Permissions")),1),e.userHasAccess||e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",We))],2),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:0,class:Object(o["normalizeClass"])([{active:"superuser"===e.activeTab},"menuSuperuser"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[2]||(t[2]=Object(o["withModifiers"])((function(t){return e.activeTab="superuser"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserAccess")),1)],2)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole&&e.theUser.uses_2fa&&!e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:1,class:Object(o["normalizeClass"])([{active:"2fa"===e.activeTab},"menuUserTwoFa"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[3]||(t[3]=Object(o["withModifiers"])((function(t){return e.activeTab="2fa"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_TwoFactorAuthentication")),1)],2)):Object(o["createCommentVNode"])("",!0)]),Ye,Object(o["createElementVNode"])("div",{class:"entityCancel",onClick:t[4]||(t[4]=Object(o["withModifiers"])((function(t){return e.onDoneEditing()}),["prevent"]))},[Object(o["createElementVNode"])("a",Xe,[Je,Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BackToUser")),1)])])])),Object(o["createElementVNode"])("div",Ke,["basic"===e.activeTab?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Qe,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{modelValue:e.theUser.login,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.theUser.login=t}),disabled:e.isSavingUserInfo||!e.isAdd||e.isShowingPasswordConfirm,autocomplete:"off",uicontrol:"text",name:"user_login",maxlength:100,title:e.translate("General_Username")},null,8,["modelValue","disabled","title"])]),Object(o["createElementVNode"])("div",null,[e.isPending?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,"model-value":e.theUser.password,disabled:e.isSavingUserInfo||"superuser"!==e.currentUserRole&&!e.isAdd||e.isShowingPasswordConfirm,"onUpdate:modelValue":t[6]||(t[6]=function(t){e.theUser.password=t,e.isPasswordModified=!0}),uicontrol:"password",name:"user_password",autocomplete:"new-password",title:e.translate("General_Password")},null,8,["model-value","disabled","title"]))]),Object(o["createElementVNode"])("div",null,["superuser"===e.currentUserRole||e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,modelValue:e.theUser.email,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.theUser.email=t}),disabled:e.isSavingUserInfo||"superuser"!==e.currentUserRole&&!e.isAdd||e.isShowingPasswordConfirm,uicontrol:"text",name:"user_email",autocomplete:"off",maxlength:100,title:e.translate("UsersManager_Email")},null,8,["modelValue","disabled","title"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",null,[e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,modelValue:e.firstSiteAccess,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.firstSiteAccess=t}),disabled:e.isSavingUserInfo,uicontrol:"site",name:"user_site","ui-control-attributes":{onlySitesWithAdminAccess:!0},title:e.translate("UsersManager_FirstWebsitePermission"),"inline-help":e.translate("UsersManager_FirstSiteInlineHelp")},null,8,["modelValue","disabled","title","inline-help"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("div",Ze,[Object(o["createElementVNode"])("div",et,["superuser"===e.currentUserRole||e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(l,{key:0,value:e.saveButtonLabel,disabled:e.isAdd&&(!e.firstSiteAccess||!e.firstSiteAccess.id),saving:e.isSavingUserInfo,onConfirm:e.saveUserInfo},null,8,["value","disabled","saving","onConfirm"])):Object(o["createCommentVNode"])("",!0)])]),e.user&&e.isPending?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",tt,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_InvitationSent"))+" ",1),Object(o["createElementVNode"])("span",{class:"resend-link",onClick:t[9]||(t[9]=function(){return e.resendRequestedUser&&e.resendRequestedUser.apply(e,arguments)}),innerHTML:e.$sanitize(e.translate("UsersManager_ResendInvite")+"/"+e.translate("UsersManager_CopyLink"))},null,8,nt)])):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationForInviteUser,"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.showPasswordConfirmationForInviteUser=t}),onConfirmed:e.inviteUser},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])]),e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",st,[Object(o["createElementVNode"])("a",{href:"",class:"entityCancelLink",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.onDoneEditing()}),["prevent"]))},[rt,Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BackToUser")),1)])])):Object(o["createCommentVNode"])("",!0)])):Object(o["createCommentVNode"])("",!0),e.isAdd?Object(o["createCommentVNode"])("",!0):Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ot,[e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",it,[Object(o["createVNode"])(d,{"user-login":e.theUser.login,onUserHasAccessDetected:t[12]||(t[12]=function(t){return e.userHasAccess=t.hasAccess}),onAccessChanged:t[13]||(t[13]=function(t){return e.isUserModified=!0}),"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels},null,8,["user-login","access-levels","filter-access-levels"])])),e.theUser.superuser_access?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",at,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUsersPermissionsNotice")),1)):Object(o["createCommentVNode"])("",!0)],512)),[[o["vShow"],"permissions"===e.activeTab]]),"superuser"!==e.activeTab||"superuser"!==e.currentUserRole||e.isAdd?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",lt,[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserIntro1")),1),Object(o["createElementVNode"])("p",null,[Object(o["createElementVNode"])("strong",null,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserIntro2")),1)]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{modelValue:e.superUserAccessChecked,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.superUserAccessChecked=t}),onClick:t[15]||(t[15]=function(t){return e.confirmSuperUserChange()}),disabled:e.isSavingUserInfo,uicontrol:"checkbox",name:"superuser_access",title:e.translate("UsersManager_HasSuperUserAccess")},null,8,["modelValue","disabled","title"])]),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationForSuperUser,"onUpdate:modelValue":t[16]||(t[16]=function(t){return e.showPasswordConfirmationForSuperUser=t}),onConfirmed:e.toggleSuperuserAccess,onAborted:t[17]||(t[17]=function(t){return e.setSuperUserAccessChecked()})},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_AreYouSure")),1),e.theUser.superuser_access?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",ct,Object(o["toDisplayString"])(e.translate("UsersManager_RemoveSuperuserAccessConfirm")),1)):Object(o["createCommentVNode"])("",!0),e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",dt,Object(o["toDisplayString"])(e.translate("UsersManager_AddSuperuserAccessConfirm")),1))]})),_:1},8,["modelValue","onConfirmed"])])),"superuser"!==e.currentUserRole||e.isAdd?Object(o["createCommentVNode"])("",!0):Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ut,[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ResetTwoFactorAuthenticationInfo")),1),Object(o["createElementVNode"])("div",mt,[Object(o["createVNode"])(l,{saving:e.isResetting2FA,onConfirm:t[18]||(t[18]=function(t){return e.confirmReset2FA()}),value:e.translate("UsersManager_ResetTwoFactorAuthentication")},null,8,["saving","value"])]),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationFor2FA,"onUpdate:modelValue":t[19]||(t[19]=function(t){return e.showPasswordConfirmationFor2FA=t}),onConfirmed:e.reset2FA},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_AreYouSure")),1),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])],512)),[[o["vShow"],"2fa"===e.activeTab]])])],512),[[m]]),Object(o["createVNode"])(c,{modelValue:e.isShowingPasswordConfirm,"onUpdate:modelValue":t[20]||(t[20]=function(t){return e.isShowingPasswordConfirm=t}),onConfirmed:e.updateUser},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",{innerHTML:e.$sanitize(e.changePasswordTitle)},null,8,bt),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])]})),_:1},8,["class","content-title"])}var gt={login:"",superuser_access:!1,uses_2fa:!1,password:"",email:"",invite_status:""},ft=Object(o["defineComponent"])({props:{user:Object,currentUserRole:{type:String,required:!0},accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},initialSiteId:{type:[String,Number],required:!0},initialSiteName:{type:String,required:!0},inviteTokenExpiryDays:{type:String,required:!0}},components:{ContentBlock:g["ContentBlock"],Field:f["Field"],SaveButton:f["SaveButton"],UserPermissionsEdit:Fe,PasswordConfirmation:f["PasswordConfirmation"]},directives:{Form:f["Form"]},data:function(){return{theUser:this.user||Object.assign({},gt),activeTab:"basic",permissionsForIdSite:1,isSavingUserInfo:!1,userHasAccess:!0,firstSiteAccess:{id:this.initialSiteId,name:this.initialSiteName},isUserModified:!1,isPasswordModified:!1,superUserAccessChecked:null,showPasswordConfirmationForSuperUser:!1,showPasswordConfirmationFor2FA:!1,showPasswordConfirmationForInviteUser:!1,isResetting2FA:!1,isShowingPasswordConfirm:!1}},emits:["done","updated","resendInvite"],watch:{user:function(e){this.onUserChange(e)}},created:function(){this.onUserChange(this.user)},methods:{onUserChange:function(e){this.theUser=e||Object.assign({},gt),this.theUser.password||this.resetPasswordVar(),this.setSuperUserAccessChecked()},confirmSuperUserChange:function(){this.showPasswordConfirmationForSuperUser=!0},confirmReset2FA:function(){this.showPasswordConfirmationFor2FA=!0},toggleSuperuserAccess:function(e){var t=this;this.isSavingUserInfo=!0,g["AjaxHelper"].post({method:"UsersManager.setSuperUserAccess"},{userLogin:this.theUser.login,hasSuperUserAccess:this.theUser.superuser_access?"0":"1",passwordConfirmation:e}).then((function(){t.theUser.superuser_access=!t.theUser.superuser_access})).catch((function(){})).then((function(){t.isSavingUserInfo=!1,t.setSuperUserAccessChecked()}))},saveUserInfo:function(){this.isAdd?this.showPasswordConfirmationForInviteUser=!0:this.isShowingPasswordConfirm=!0},resendRequestedUser:function(){this.$emit("resendInvite",{user:this.user})},inviteUser:function(e){var t=this;return this.isSavingUserInfo=!0,g["AjaxHelper"].post({method:"UsersManager.inviteUser"},{userLogin:this.theUser.login,email:this.theUser.email,initialIdSite:this.firstSiteAccess?this.firstSiteAccess.id:void 0,passwordConfirmation:e}).catch((function(e){throw t.isSavingUserInfo=!1,e})).then((function(){t.firstSiteAccess=null,t.isSavingUserInfo=!1,t.isUserModified=!0,t.theUser.invite_status="pending",t.resetPasswordVar(),t.showUserCreatedNotification(),t.$emit("updated",{user:Object(o["readonly"])(t.theUser)})}))},resetPasswordVar:function(){this.isAdd||(this.theUser.password="XXXXXXXX")},showUserSavedNotification:function(){g["NotificationsStore"].show({message:Object(g["translate"])("General_YourChangesHaveBeenSaved"),context:"success",type:"toast"})},showUserCreatedNotification:function(){g["NotificationsStore"].show({message:Object(g["translate"])("UsersManager_InviteSuccess"),context:"success",type:"toast"})},reset2FA:function(e){var t=this;return this.isResetting2FA=!0,g["AjaxHelper"].post({method:"TwoFactorAuth.resetTwoFactorAuth"},{userLogin:this.theUser.login,passwordConfirmation:e}).catch((function(e){throw t.isResetting2FA=!1,e})).then((function(){t.isResetting2FA=!1,t.theUser.uses_2fa=!1,t.activeTab="basic",t.showUserSavedNotification()}))},updateUser:function(e){var t=this;return this.isSavingUserInfo=!0,g["AjaxHelper"].post({method:"UsersManager.updateUser"},{userLogin:this.theUser.login,password:this.isPasswordModified&&this.theUser.password?this.theUser.password:void 0,passwordConfirmation:e,email:this.theUser.email}).then((function(){t.isSavingUserInfo=!1,t.isUserModified=!0,t.isPasswordModified=!1,t.resetPasswordVar(),t.showUserSavedNotification(),t.$emit("updated",{user:Object(o["readonly"])(t.theUser)})})).catch((function(){t.isSavingUserInfo=!1}))},setSuperUserAccessChecked:function(){this.superUserAccessChecked=!!this.theUser.superuser_access},onDoneEditing:function(){this.$emit("done",{isUserModified:this.isUserModified})}},computed:{formTitle:function(){return this.isAdd?Object(g["translate"])("UsersManager_InviteNewUser"):""},saveButtonLabel:function(){return this.isAdd?Object(g["translate"])("UsersManager_InviteUser"):Object(g["translate"])("UsersManager_SaveBasicInfo")},isPending:function(){return!this.user||!("pending"!==this.user.invite_status&&!Number.isInteger(this.user.invite_status))},isAdd:function(){return!this.user},changePasswordTitle:function(){return Object(g["translate"])("UsersManager_AreYouSureChangeDetails","".concat(this.theUser.login,""))}}});ft.render=pt;var ht=ft,Ot={class:"userListFilters row"},jt={class:"col s12 m12 l8"},vt={class:"input-field col s12 m3 l3"},Ct={id:"user-list-bulk-actions",class:"dropdown-content"},yt={class:"dropdown-trigger","data-target":"bulk-set-access"},kt={id:"bulk-set-access",class:"dropdown-content"},Nt=["onClick"],St={key:0},Vt={class:"input-field col s12 m3 l3"},Ut={class:"permissions-for-selector"},Et={class:"input-field col s12 m3 l3"},wt={class:"input-field col s12 m3 l3"},At={key:0,class:"input-field col s12 m12 l4 users-list-pagination-container"},Tt={class:"usersListPagination"},Mt={class:"pointer"},Bt={class:"counter"},_t={class:"pointer"},Dt={key:0,class:"roles-help-notification"},xt=["innerHTML"],Lt={class:"select-cell"},Rt={class:"checkbox-container"},Pt=Object(o["createElementVNode"])("span",null,null,-1),Ft={class:"first"},Ht={class:"role_header"},It={style:{"margin-right":"3.5px"}},qt=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),$t=[qt],Gt={key:0},zt=["title"],Wt={key:2},Yt={class:"actions-cell-header"},Xt={key:0,class:"select-all-row"},Jt={colspan:"8"},Kt={key:0},Qt=["innerHTML"],Zt=["innerHTML"],en={key:1},tn=["innerHTML"],nn=["innerHTML"],sn=["id"],rn={class:"select-cell"},on={class:"checkbox-container"},an=["id","onUpdate:modelValue"],ln=Object(o["createElementVNode"])("span",null,null,-1),cn={id:"userLogin"},dn={class:"access-cell"},un={key:0,id:"email"},mn={key:1,id:"twofa"},bn={key:0,class:"icon-ok"},pn={key:1,class:"icon-close"},gn={key:2,id:"last_seen"},fn={id:"status"},hn=["title"],On={class:"center actions-cell"},jn=["onClick"],vn=Object(o["createElementVNode"])("span",{class:"icon-email"},null,-1),Cn=[vn],yn=["onClick"],kn=Object(o["createElementVNode"])("span",{class:"icon-edit"},null,-1),Nn=[kn],Sn=["onClick"],Vn=Object(o["createElementVNode"])("span",{class:"icon-delete"},null,-1),Un=[Vn],En=["innerHTML"],wn=["innerHTML"],An={class:"change-user-role-confirm-modal modal",ref:"changeUserRoleConfirmModal"},Tn={class:"modal-content"},Mn=["innerHTML"],Bn={key:1},_n=["innerHTML"],Dn=["innerHTML"],xn={class:"modal-footer"};function Ln(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("ActivityIndicator"),c=Object(o["resolveComponent"])("Notification"),d=Object(o["resolveComponent"])("ContentBlock"),u=Object(o["resolveComponent"])("PasswordConfirmation"),m=Object(o["resolveDirective"])("dropdown-menu"),b=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["pagedUsersList",{loading:e.isLoadingUsers}])},[Object(o["createElementVNode"])("div",Ot,[Object(o["createElementVNode"])("div",jt,[Object(o["createElementVNode"])("div",vt,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["dropdown-trigger btn bulk-actions",{disabled:e.isBulkActionsDisabled}]),href:"","data-target":"user-list-bulk-actions"},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BulkActions")),1)],2),[[m]]),Object(o["createElementVNode"])("ul",Ct,[Object(o["createElementVNode"])("li",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",yt,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_SetPermission")),1)],512),[[m]]),Object(o["createElementVNode"])("ul",kt,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.bulkActionAccessLevels,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:t.key},[Object(o["createElementVNode"])("a",{href:"",onClick:Object(o["withModifiers"])((function(n){e.userToChange=null,e.roleToChangeTo=t.key,e.showAccessChangeConfirm()}),["prevent"])},Object(o["toDisplayString"])(t.value),9,Nt)])})),128))])]),Object(o["createElementVNode"])("li",null,[Object(o["createElementVNode"])("a",{href:"",onClick:t[0]||(t[0]=Object(o["withModifiers"])((function(t){e.userToChange=null,e.roleToChangeTo="noaccess",e.showAccessChangeConfirm()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_RemovePermissions")),1)]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",St,[Object(o["createElementVNode"])("a",{href:"",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.showDeleteConfirm()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_DeleteUsers")),1)])):Object(o["createCommentVNode"])("",!0)])]),Object(o["createElementVNode"])("div",Vt,[Object(o["createElementVNode"])("div",Ut,[Object(o["createVNode"])(a,{"model-value":e.userTextFilter,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.onUserTextFilterChange(t)}),name:"user-text-filter",uicontrol:"text","full-width":!0,placeholder:e.translate("UsersManager_UserSearch")},null,8,["model-value","placeholder"])])]),Object(o["createElementVNode"])("div",Et,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":e.accessLevelFilter,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.accessLevelFilter=t,e.changeSearch({filter_access:e.accessLevelFilter,offset:0})}),name:"access-level-filter",uicontrol:"select",options:e.filterAccessLevels,"full-width":!0,placeholder:e.translate("UsersManager_FilterByAccess")},null,8,["model-value","options","placeholder"])])]),Object(o["createElementVNode"])("div",wt,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":e.statusLevelFilter,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.statusLevelFilter=t,e.changeSearch({filter_status:e.statusLevelFilter,offset:0})}),name:"status-level-filter",uicontrol:"select",options:e.filterStatusLevels,"full-width":!0,placeholder:e.translate("UsersManager_FilterByStatus")},null,8,["model-value","options","placeholder"])])])]),e.totalEntries>e.searchParams.limit?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",At,[Object(o["createElementVNode"])("div",Tt,[Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["btn prev",{disabled:e.searchParams.offset<=0}]),onClick:t[5]||(t[5]=Object(o["withModifiers"])((function(t){return e.gotoPreviousPage()}),["prevent"]))},[Object(o["createElementVNode"])("span",Mt,"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],2),Object(o["createElementVNode"])("div",Bt,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])({visibility:e.isLoadingUsers?"hidden":"visible"})},Object(o["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.totalEntries)),3),Object(o["createVNode"])(l,{loading:e.isLoadingUsers},null,8,["loading"])]),Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["btn next",{disabled:e.searchParams.offset+e.searchParams.limit>=e.totalEntries}]),onClick:t[6]||(t[6]=Object(o["withModifiers"])((function(t){return e.gotoNextPage()}),["prevent"]))},[Object(o["createElementVNode"])("span",_t,Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],2)])])):Object(o["createCommentVNode"])("",!0)]),e.isRoleHelpToggled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Dt,[Object(o["createVNode"])(c,{context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.rolesHelpText)},null,8,xt)]})),_:1})])):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(d,null,{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("table",{id:"manageUsersTable",class:Object(o["normalizeClass"])({loading:e.isLoadingUsers})},[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",Lt,[Object(o["createElementVNode"])("span",Rt,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"paged_users_select_all",checked:"checked","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.isAllCheckboxSelected=t}),onChange:t[8]||(t[8]=function(t){return e.onAllCheckboxChange()})},null,544),[[o["vModelCheckbox"],e.isAllCheckboxSelected]]),Pt])])]),Object(o["createElementVNode"])("th",Ft,Object(o["toDisplayString"])(e.translate("UsersManager_Username")),1),Object(o["createElementVNode"])("th",Ht,[Object(o["createElementVNode"])("span",It,Object(o["toDisplayString"])(e.translate("UsersManager_RoleFor")),1),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isRoleHelpToggled}]),onClick:t[9]||(t[9]=Object(o["withModifiers"])((function(t){return e.isRoleHelpToggled=!e.isRoleHelpToggled}),["prevent"]))},$t,2),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{class:"permissions-for-selector","model-value":e.permissionsForSite,"onUpdate:modelValue":t[10]||(t[10]=function(t){e.onPermissionsForUpdate(t)}),uicontrol:"site","ui-control-attributes":{onlySitesWithAdminAccess:"superuser"!==e.currentUserRole}},null,8,["model-value","ui-control-attributes"])])]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",Gt,Object(o["toDisplayString"])(e.translate("UsersManager_Email")),1)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:1,title:e.translate("UsersManager_UsesTwoFactorAuthentication")},Object(o["toDisplayString"])(e.translate("UsersManager_2FA")),9,zt)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",Wt,Object(o["toDisplayString"])(e.translate("UsersManager_LastSeen")),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("UsersManager_Status")),1),Object(o["createElementVNode"])("th",Yt,[Object(o["createElementVNode"])("div",null,Object(o["toDisplayString"])(e.translate("General_Actions")),1)])])]),Object(o["createElementVNode"])("tbody",null,[e.isAllCheckboxSelected&&e.users.length&&e.users.length".concat(e.users.length,""))),style:{"margin-right":"3.5px"}},null,8,Qt),Object(o["createElementVNode"])("a",{class:"toggle-select-all-in-search",href:"#",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.translate("UsersManager_ClickToSelectAll","".concat(e.totalEntries,"")))},null,8,Zt)])),e.areAllResultsSelected?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",en,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_AllUsersAreSelected","".concat(e.totalEntries,""))),style:{"margin-right":"3.5px"}},null,8,tn),Object(o["createElementVNode"])("a",{class:"toggle-select-all-in-search",href:"#",onClick:t[12]||(t[12]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.translate("UsersManager_ClickToSelectDisplayedUsers","".concat(e.users.length,"")))},null,8,nn)])):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.users,(function(n,s){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{id:"row".concat(s),key:n.login},[Object(o["createElementVNode"])("td",rn,[Object(o["createElementVNode"])("span",on,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"paged_users_select_row".concat(s),"onUpdate:modelValue":function(t){return e.selectedRows[s]=t},onClick:t[13]||(t[13]=function(t){return e.onRowSelected()})},null,8,an),[[o["vModelCheckbox"],e.selectedRows[s]]]),ln])])]),Object(o["createElementVNode"])("td",cn,Object(o["toDisplayString"])(n.login),1),Object(o["createElementVNode"])("td",dn,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":n.role,"onUpdate:modelValue":function(t){e.userToChange=n,e.roleToChangeTo=t,e.showAccessChangeConfirm()},disabled:"superuser"===n.role,uicontrol:"select",options:"anonymous"===n.login?e.anonymousAccessLevels:"noaccess"===n.role?e.onlyRoleAccessLevels:e.accessLevels},null,8,["model-value","onUpdate:modelValue","disabled","options"])])]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",un,Object(o["toDisplayString"])(n.email),1)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",mn,[n.uses_2fa?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",bn)):Object(o["createCommentVNode"])("",!0),n.uses_2fa?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",pn))])):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",gn,Object(o["toDisplayString"])(n.last_seen?"".concat(n.last_seen," ago"):"-"),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("td",fn,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(Number.isInteger(n.invite_status)?"pending":n.invite_status),title:"expired"===n.invite_status?e.translate("UsersManager_ExpiredInviteAutomaticallyRemoved","3"):""},Object(o["toDisplayString"])(e.getInviteStatus(n.invite_status)),11,hn)]),Object(o["createElementVNode"])("td",On,[("superuser"===e.currentUserRole||"admin"===e.currentUserRole&&n.invited_by===e.currentUserLogin)&&"active"!==n.invite_status?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:0,class:"resend table-action",title:"Resend/Copy Invite Link",onClick:function(t){e.userToChange=n,e.resendRequestedUser()}},Cn,8,jn)):Object(o["createCommentVNode"])("",!0),"anonymous"!==n.login?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:1,class:"edituser table-action",title:"Edit",onClick:function(t){return e.$emit("editUser",{user:n})}},Nn,8,yn)):Object(o["createCommentVNode"])("",!0),("superuser"===e.currentUserRole||"admin"===e.currentUserRole&&n.invited_by===e.currentUserLogin)&&"anonymous"!==n.login?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:2,class:"deleteuser table-action",title:"Delete",onClick:function(t){e.userToChange=n,e.showDeleteConfirm()}},Un,8,Sn)):Object(o["createCommentVNode"])("",!0)])],8,sn)})),128))])],2),[[b]])]})),_:1}),Object(o["createVNode"])(u,{modelValue:e.showPasswordConfirmationForUserRemoval,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.showPasswordConfirmationForUserRemoval=t}),onConfirmed:e.deleteRequestedUsers,onAborted:t[15]||(t[15]=function(t){e.userToChange=null,e.roleToChangeTo=null})},{default:Object(o["withCtx"])((function(){return[e.userToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:0,innerHTML:e.$sanitize(e.translate("UsersManager_DeleteUserConfirmSingle","".concat(e.userToChange.login,"")))},null,8,En)):Object(o["createCommentVNode"])("",!0),e.userToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:1,innerHTML:e.$sanitize(e.translate("UsersManager_DeleteUserConfirmMultiple","".concat(e.affectedUsersCount,"")))},null,8,wn)),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"]),Object(o["createElementVNode"])("div",An,[Object(o["createElementVNode"])("div",Tn,[e.userToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.deleteUserPermConfirmSingleText)},null,8,Mn)):Object(o["createCommentVNode"])("",!0),e.userToChange&&"anonymous"===e.userToChange.login&&"view"===e.roleToChangeTo?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",Bn,[Object(o["createElementVNode"])("em",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_Note"))+": ",1),Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_AnonymousUserRoleChangeWarning","anonymous",e.getRoleDisplay(e.roleToChangeTo)))},null,8,_n)])])):Object(o["createCommentVNode"])("",!0),e.userToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:2,innerHTML:e.$sanitize(e.deleteUserPermConfirmMultipleText)},null,8,Dn))]),Object(o["createElementVNode"])("div",xn,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[16]||(t[16]=Object(o["withModifiers"])((function(t){return e.changeUserRole()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[17]||(t[17]=Object(o["withModifiers"])((function(t){e.userToChange=null,e.roleToChangeTo=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512)],2)}var Rn=window,Pn=Rn.$,Fn=Object(o["defineComponent"])({props:{initialSiteId:{type:[String,Number],required:!0},initialSiteName:{type:String,required:!0},currentUserRole:String,isLoadingUsers:Boolean,accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},filterStatusLevels:{type:Array,required:!0},totalEntries:Number,users:{type:Array,required:!0},searchParams:{type:Object,required:!0}},components:{Field:f["Field"],ActivityIndicator:g["ActivityIndicator"],Notification:g["Notification"],ContentBlock:g["ContentBlock"],PasswordConfirmation:f["PasswordConfirmation"]},directives:{DropdownMenu:g["DropdownMenu"],ContentTable:g["ContentTable"]},data:function(){return{areAllResultsSelected:!1,selectedRows:{},isAllCheckboxSelected:!1,isBulkActionsDisabled:!0,userToChange:null,roleToChangeTo:null,accessLevelFilter:null,statusLevelFilter:null,isRoleHelpToggled:!1,userTextFilter:"",permissionsForSite:{id:this.initialSiteId,name:this.initialSiteName},showPasswordConfirmationForUserRemoval:!1}},emits:["editUser","changeUserRole","deleteUser","searchChange","resendInvite"],created:function(){this.onUserTextFilterChange=Object(g["debounce"])(this.onUserTextFilterChange,300)},watch:{users:function(){this.clearSelection()}},methods:{getInviteStatus:function(e){return Number.isInteger(e)?Object(g["translate"])("UsersManager_InviteDayLeft",e):"expired"===e?Object(g["translate"])("UsersManager_Expired"):Object(g["translate"])("UsersManager_Active")},onPermissionsForUpdate:function(e){this.permissionsForSite=e,this.changeSearch({idSite:this.permissionsForSite.id})},clearSelection:function(){this.selectedRows={},this.areAllResultsSelected=!1,this.isBulkActionsDisabled=!0,this.isAllCheckboxSelected=!1,this.userToChange=null},onAllCheckboxChange:function(){if(this.isAllCheckboxSelected){for(var e=0;e!==this.users.length;e+=1)this.selectedRows[e]=!0;this.isBulkActionsDisabled=!1}else this.clearSelection()},changeUserRole:function(){this.$emit("changeUserRole",{users:this.userOperationSubject,role:this.roleToChangeTo})},onRowSelected:function(){var e=this.selectedCount;this.isBulkActionsDisabled=0===e,this.isAllCheckboxSelected=e===this.users.length},deleteRequestedUsers:function(e){this.$emit("deleteUser",{users:this.userOperationSubject,password:e})},resendRequestedUser:function(){this.$emit("resendInvite",{user:this.userToChange})},showDeleteConfirm:function(){this.showPasswordConfirmationForUserRemoval=!0},showAccessChangeConfirm:function(){Pn(this.$refs.changeUserRoleConfirmModal).modal({dismissible:!1}).modal("open")},getRoleDisplay:function(e){var t=null;return this.accessLevels.forEach((function(n){n.key===e&&(t=n.value)})),t},changeSearch:function(e){var t=Object.assign(Object.assign({},this.searchParams),e);this.$emit("searchChange",{params:t})},gotoPreviousPage:function(){this.changeSearch({offset:Math.max(0,this.searchParams.offset-this.searchParams.limit)})},gotoNextPage:function(){var e=this.searchParams.offset+this.searchParams.limit;e>=this.totalEntries||this.changeSearch({offset:e})},onUserTextFilterChange:function(e){this.userTextFilter=e,this.changeSearch({filter_search:e,offset:0})}},computed:{currentUserLogin:function(){return g["Matomo"].userLogin},paginationLowerBound:function(){return this.searchParams.offset+1},paginationUpperBound:function(){if(null===this.totalEntries)return"?";var e=this.searchParams;return Math.min(e.offset+e.limit,this.totalEntries)},userOperationSubject:function(){return this.userToChange?[this.userToChange]:this.areAllResultsSelected?"all":this.selectedUsers},selectedUsers:function(){var e=this,t=this.users,n=[];return Object.keys(this.selectedRows).forEach((function(s){var r=parseInt(s,10);e.selectedRows[s]&&t[r]&&n.push(t[r])})),n},rolesHelpText:function(){var e="https://matomo.org/faq/general/faq_70/",t="https://matomo.org/faq/general/faq_69/";return Object(g["translate"])("UsersManager_RolesHelp",''),"",''),"")},affectedUsersCount:function(){return this.areAllResultsSelected?this.totalEntries||0:this.selectedCount},selectedCount:function(){var e=this,t=0;return Object.keys(this.selectedRows).forEach((function(n){e.selectedRows[n]&&(t+=1)})),t},deleteUserPermConfirmSingleText:function(){var e,t;return Object(g["translate"])("UsersManager_DeleteUserPermConfirmSingle","".concat((null===(e=this.userToChange)||void 0===e?void 0:e.login)||"",""),"".concat(this.getRoleDisplay(this.roleToChangeTo),""),"".concat(g["Matomo"].helper.htmlEntities((null===(t=this.permissionsForSite)||void 0===t?void 0:t.name)||""),""))},deleteUserPermConfirmMultipleText:function(){var e;return Object(g["translate"])("UsersManager_DeleteUserPermConfirmMultiple","".concat(this.affectedUsersCount,""),"".concat(this.getRoleDisplay(this.roleToChangeTo),""),"".concat(g["Matomo"].helper.htmlEntities((null===(e=this.permissionsForSite)||void 0===e?void 0:e.name)||""),""))},bulkActionAccessLevels:function(){return this.accessLevels.filter((function(e){return"noaccess"!==e.key&&"superuser"!==e.key}))},anonymousAccessLevels:function(){return this.accessLevels.filter((function(e){return"noaccess"===e.key||"view"===e.key}))},onlyRoleAccessLevels:function(){return this.accessLevels.filter((function(e){return"role"===e.type}))}}});Fn.render=Ln;var Hn=Fn,In={class:"usersManager"},qn={key:0},$n={key:1},Gn={class:"row add-user-container"},zn={class:"col s12"},Wn={class:"input-field",style:{"margin-right":"3.5px"}},Yn={key:0,class:"input-field"},Xn={key:0},Jn={class:"resend-invite-confirm-modal modal",ref:"resendInviteConfirmModal"},Kn=Object(o["createElementVNode"])("div",{class:"btn-close modal-close"},[Object(o["createElementVNode"])("i",{class:"icon-close"})],-1),Qn={class:"modal-content"},Zn={class:"modal-title"},es=["innerHTML"],ts={class:"modal-footer"},ns={key:0,class:"success-copied"},ss=Object(o["createElementVNode"])("i",{class:"icon-success"},null,-1),rs={class:"add-existing-user-modal modal",ref:"addExistingUserModal"},os={class:"modal-content"},is={class:"modal-footer"};function as(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("EnrichedHeadline"),l=Object(o["resolveComponent"])("PagedUsersList"),c=Object(o["resolveComponent"])("UserEditForm"),d=Object(o["resolveComponent"])("Field"),u=Object(o["resolveComponent"])("PasswordConfirmation"),m=Object(o["resolveDirective"])("content-intro"),b=Object(o["resolveDirective"])("tooltips");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",In,[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("h2",null,[Object(o["createVNode"])(a,{"help-url":"https://matomo.org/docs/manage-users/","feature-name":"Users Management"},{default:Object(o["withCtx"])((function(){return[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsers")),1)]})),_:1})]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",qn,Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsersDesc")),1)):Object(o["createCommentVNode"])("",!0),"admin"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",$n,Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsersAdminDesc")),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Gn,[Object(o["createElementVNode"])("div",zn,[Object(o["createElementVNode"])("div",Wn,[Object(o["createElementVNode"])("a",{class:"btn add-new-user",onClick:t[0]||(t[0]=function(t){return e.onAddNewUser()})},Object(o["toDisplayString"])(e.translate("UsersManager_InviteNewUser")),1)]),"superuser"!==e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Yn,[Object(o["createElementVNode"])("a",{class:"btn add-existing-user",onClick:t[1]||(t[1]=function(t){return e.showAddExistingUserModal()})},Object(o["toDisplayString"])(e.translate("UsersManager_AddExistingUser")),1)])):Object(o["createCommentVNode"])("",!0)])]),Object(o["createVNode"])(l,{onEditUser:t[2]||(t[2]=function(t){return e.onEditUser(t.user)}),onChangeUserRole:t[3]||(t[3]=function(t){return e.onChangeUserRole(t.users,t.role)}),onDeleteUser:t[4]||(t[4]=function(t){return e.onDeleteUser(t.users,t.password)}),onSearchChange:t[5]||(t[5]=function(t){e.searchParams=t.params,e.fetchUsers()}),onResendInvite:t[6]||(t[6]=function(t){return e.showResendPopup(t.user)}),"initial-site-id":e.initialSiteId,"initial-site-name":e.initialSiteName,"is-loading-users":e.isLoadingUsers,"current-user-role":e.currentUserRole,"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels,"filter-status-levels":e.filterStatusLevels,"search-params":e.searchParams,users:e.users,"total-entries":e.totalEntries},null,8,["initial-site-id","initial-site-name","is-loading-users","current-user-role","access-levels","filter-access-levels","filter-status-levels","search-params","users","total-entries"])],512),[[m]])],512),[[o["vShow"],!e.isEditing]]),e.isEditing?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Xn,[Object(o["createVNode"])(c,{onDone:t[7]||(t[7]=function(t){return e.onDoneEditing(t.isUserModified)}),user:e.userBeingEdited,"current-user-role":e.currentUserRole,"invite-token-expiry-days":e.inviteTokenExpiryDays,"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels,"initial-site-id":e.initialSiteId,"initial-site-name":e.initialSiteName,onResendInvite:t[8]||(t[8]=function(t){return e.showResendPopup(t.user)}),onUpdated:t[9]||(t[9]=function(t){return e.userBeingEdited=t.user})},null,8,["user","current-user-role","invite-token-expiry-days","access-levels","filter-access-levels","initial-site-id","initial-site-name"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Jn,[Kn,Object(o["createElementVNode"])("div",Qn,[Object(o["createElementVNode"])("h2",Zn,Object(o["toDisplayString"])(e.translate("UsersManager_ResendInvite")),1),e.userBeingEdited?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.translate("UsersManager_InviteConfirmMessage",["".concat(e.userBeingEdited.login,""),"".concat(e.userBeingEdited.email,"")]))},null,8,es)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("p",null,[Object(o["createElementVNode"])("strong",null,Object(o["toDisplayString"])(e.translate("UsersManager_InviteActionNotes",e.inviteTokenExpiryDays)),1)])]),Object(o["createElementVNode"])("div",ts,[e.copied?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",ns,[ss,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_LinkCopied")),1)])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("button",{onClick:t[10]||(t[10]=function(t){return e.showInviteActionPasswordConfirm("copy")}),class:"btn btn-copy-link modal-action",style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("UsersManager_CopyLink")),1),Object(o["createElementVNode"])("button",{class:"btn btn-resend modal-action modal-no",onClick:t[11]||(t[11]=function(t){return e.showInviteActionPasswordConfirm("send")})},Object(o["toDisplayString"])(e.translate("UsersManager_ResendInvite")),1)])],512),Object(o["createElementVNode"])("div",rs,[Object(o["createElementVNode"])("div",os,[Object(o["createElementVNode"])("h3",null,Object(o["toDisplayString"])(e.translate("UsersManager_AddExistingUser")),1),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_EnterUsernameOrEmail"))+":",1),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(d,{modelValue:e.addNewUserLoginEmail,"onUpdate:modelValue":t[12]||(t[12]=function(t){return e.addNewUserLoginEmail=t}),name:"add-existing-user-email",uicontrol:"text"},null,8,["modelValue"])])]),Object(o["createElementVNode"])("div",is,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[13]||(t[13]=Object(o["withModifiers"])((function(t){return e.addExistingUser()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Add")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[14]||(t[14]=Object(o["withModifiers"])((function(t){return e.addNewUserLoginEmail=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Cancel")),1)])],512),Object(o["createVNode"])(u,{modelValue:e.showPasswordConfirmationForInviteAction,"onUpdate:modelValue":t[15]||(t[15]=function(t){return e.showPasswordConfirmationForInviteAction=t}),onConfirmed:e.onInviteAction},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])],512)),[[b]])}var ls=20,cs=window,ds=cs.$,us=Object(o["defineComponent"])({props:{currentUserRole:{type:String,required:!0},initialSiteName:{type:String,required:!0},initialSiteId:{type:String,required:!0},accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},filterStatusLevels:{type:Array,required:!0},inviteTokenExpiryDays:{type:String,required:!0}},components:{PasswordConfirmation:f["PasswordConfirmation"],EnrichedHeadline:g["EnrichedHeadline"],PagedUsersList:Hn,UserEditForm:ht,Field:f["Field"]},directives:{ContentIntro:g["ContentIntro"],Tooltips:g["Tooltips"]},data:function(){return{isEditing:!!g["MatomoUrl"].urlParsed.value.showadduser,isCurrentUserSuperUser:!0,users:[],totalEntries:null,searchParams:{offset:0,limit:ls,filter_search:"",filter_access:"",filter_status:"",idSite:this.initialSiteId},isLoadingUsers:!1,userBeingEdited:null,addNewUserLoginEmail:"",copied:!1,loading:!1,showPasswordConfirmationForInviteAction:!1,inviteAction:""}},created:function(){this.fetchUsers()},watch:{limit:function(){this.fetchUsers()}},methods:{showInviteActionPasswordConfirm:function(e){this.loading||(this.showPasswordConfirmationForInviteAction=!0,this.inviteAction=e)},showResendPopup:function(e){this.userBeingEdited=e,ds(this.$refs.resendInviteConfirmModal).modal({dismissible:!1}).modal("open"),this.copied=!1},onInviteAction:function(e){"send"===this.inviteAction?this.onResendInvite(e):this.generateInviteLink(e)},onEditUser:function(e){g["Matomo"].helper.lazyScrollToContent(),this.isEditing=!0,this.userBeingEdited=e},onDoneEditing:function(e){this.isEditing=!1,e&&this.fetchUsers()},showAddExistingUserModal:function(){ds(this.$refs.addExistingUserModal).modal({dismissible:!1}).modal("open")},onChangeUserRole:function(e,t){var n=this;this.isLoadingUsers=!0,Promise.resolve().then((function(){return"all"===e?n.getAllUsersInSearch():e})).then((function(e){return e.filter((function(e){return"superuser"!==e.role})).map((function(e){return e.login}))})).then((function(e){var s,r=n.accessLevels.filter((function(e){return e.key===t})).map((function(e){return e.type}));return s=r.length&&"capability"===r[0]?e.map((function(e){return{method:"UsersManager.addCapabilities",userLogin:e,capabilities:t,idSites:n.searchParams.idSite}})):e.map((function(e){return{method:"UsersManager.setUserAccess",userLogin:e,access:t,idSites:n.searchParams.idSite}})),g["AjaxHelper"].fetch(s,{createErrorNotification:!0})})).catch((function(){})).then((function(){return n.fetchUsers()}))},getAllUsersInSearch:function(){return g["AjaxHelper"].fetch({method:"UsersManager.getUsersPlusRole",filter_search:this.searchParams.filter_search,filter_access:this.searchParams.filter_access,filter_status:this.searchParams.filter_status,idSite:this.searchParams.idSite,filter_limit:"-1"})},onDeleteUser:function(e,t){var n=this;this.isLoadingUsers=!0,Promise.resolve().then((function(){return"all"===e?n.getAllUsersInSearch():e})).then((function(e){return e.map((function(e){return e.login}))})).then((function(e){var n=e.map((function(e){return{method:"UsersManager.deleteUser",userLogin:e,passwordConfirmation:t}}));return g["AjaxHelper"].fetch(n,{createErrorNotification:!0})})).then((function(){g["NotificationsStore"].scrollToNotification(g["NotificationsStore"].show({id:"removeUserSuccess",message:Object(g["translate"])("UsersManager_DeleteSuccess"),context:"success",type:"toast"})),n.fetchUsers()}),(function(){"all"!==e&&e.length>1&&g["NotificationsStore"].show({id:"removeUserSuccess",message:Object(g["translate"])("UsersManager_DeleteNotSuccessful"),context:"warning",type:"toast"}),n.fetchUsers()}))},generateInviteLink:async function(e){if(!this.loading){this.loading=!0;try{var t=await g["AjaxHelper"].post({method:"UsersManager.generateInviteLink"},{userLogin:this.userBeingEdited.login,passwordConfirmation:e});await this.copyToClipboard(t.value)}catch(n){}this.loading=!1}},copyToClipboard:async function(e){try{var t=document.createElement("input");t.style.top="-100px",t.style.left="0",t.style.position="fixed",t.value=e,document.body.appendChild(t),t.select(),"https:"!==window.location.protocol?document.execCommand("copy"):await navigator.clipboard.writeText(t.value),document.body.removeChild(t),this.copied=!0}catch(s){var n=g["NotificationsStore"].show({message:"".concat(Object(g["translate"])("UsersManager_CopyDenied"),"
\n").concat(Object(g["translate"])("UsersManager_CopyDeniedHints",['
'.concat(e,"")])),id:"copyError",context:"error",type:"transient"});g["NotificationsStore"].scrollToNotification(n)}},onResendInvite:function(e){var t=this;""!==e&&g["AjaxHelper"].post({method:"UsersManager.resendInvite",userLogin:this.userBeingEdited.login},{passwordConfirmation:e}).then((function(){t.fetchUsers(),ds(t.$refs.resendInviteConfirmModal).modal("close");var e=g["NotificationsStore"].show({message:Object(g["translate"])("UsersManager_InviteSuccess"),id:"resendInvite",context:"success",type:"transient"});g["NotificationsStore"].scrollToNotification(e)}))},fetchUsers:function(){var e=this;return this.isLoadingUsers=!0,g["AjaxHelper"].fetch(Object.assign(Object.assign({},this.searchParams),{},{method:"UsersManager.getUsersPlusRole"}),{returnResponseObject:!0}).then((function(t){var n=t.getRequestHandle();e.totalEntries=parseInt(n.getResponseHeader("x-matomo-total-results")||"0",10),e.users=n.responseJSON,e.isLoadingUsers=!1})).catch((function(){e.isLoadingUsers=!1}))},addExistingUser:function(){var e=this;return this.isLoadingUsers=!0,g["AjaxHelper"].fetch({method:"UsersManager.userExists",userLogin:this.addNewUserLoginEmail}).then((function(t){return t&&t.value?e.addNewUserLoginEmail:g["AjaxHelper"].fetch({method:"UsersManager.getUserLoginFromUserEmail",userEmail:e.addNewUserLoginEmail}).then((function(e){return e.value}))})).then((function(t){return g["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:t,access:"view",idSites:e.searchParams.idSite})})).then((function(){return e.fetchUsers()})).catch((function(){e.isLoadingUsers=!1}))},onAddNewUser:function(){var e={isAllowed:!0};g["Matomo"].postEvent("UsersManager.initAddUser",e),e&&!e.isAllowed||(this.isEditing=!0,this.userBeingEdited=null)}}});us.render=as;var ms=us,bs={key:0,class:"alert alert-info"},ps={key:1};function gs(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("ContentBlock"),d=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(c,{"content-title":e.title},{default:Object(o["withCtx"])((function(){return[0===e.anonymousSites.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",bs,Object(o["toDisplayString"])(e.translate("UsersManager_NoteNoAnonymousUserAccessSettingsWontBeUsed2")),1)):Object(o["createCommentVNode"])("",!0),e.anonymousSites.length>0?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ps,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"anonymousDefaultReport",modelValue:e.defaultReport,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.defaultReport=t}),introduction:e.translate("UsersManager_WhenUsersAreNotLoggedInAndVisitPiwikTheyShouldAccess"),options:e.defaultReportOptions},null,8,["modelValue","introduction","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"anonymousDefaultReportWebsite",modelValue:e.defaultReportWebsite,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.defaultReportWebsite=t}),options:e.anonymousSites},null,8,["modelValue","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"anonymousDefaultDate",modelValue:e.defaultDate,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.defaultDate=t}),introduction:e.translate("UsersManager_ForAnonymousUsersReportDateToLoadByDefault"),options:e.availableDefaultDates},null,8,["modelValue","introduction","options"])]),Object(o["createVNode"])(l,{saving:e.loading,onConfirm:t[3]||(t[3]=function(t){return e.save()})},null,8,["saving"])],512)),[[d]]):Object(o["createCommentVNode"])("",!0)]})),_:1},8,["content-title"])}var fs=Object(o["defineComponent"])({props:{title:{type:String,required:!0},anonymousSites:{type:Array,required:!0},anonymousDefaultReport:{type:[String,Number],required:!0},anonymousDefaultSite:{type:String,required:!0},anonymousDefaultDate:{type:String,required:!0},availableDefaultDates:{type:Object,required:!0},defaultReportOptions:{type:Object,required:!0}},components:{ContentBlock:g["ContentBlock"],SaveButton:f["SaveButton"],Field:f["Field"]},directives:{Form:f["Form"]},data:function(){return{loading:!1,defaultReport:"".concat(this.anonymousDefaultReport),defaultReportWebsite:this.anonymousDefaultSite,defaultDate:this.anonymousDefaultDate}},methods:{save:function(){var e=this,t={anonymousDefaultReport:"1"===this.defaultReport?this.defaultReportWebsite:this.defaultReport,anonymousDefaultDate:this.defaultDate};this.loading=!0,g["AjaxHelper"].post({module:"UsersManager",action:"recordAnonymousUserSettings",format:"json"},t,{withTokenInUrl:!0}).then((function(){var e=g["NotificationsStore"].show({message:Object(g["translate"])("CoreAdminHome_SettingsSaveSuccess"),id:"anonymousUserSettings",context:"success",type:"transient"});g["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.loading=!1}))}}});fs.render=gs;var hs=fs,Os={id:"newsletterSignup"};function js(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("ContentBlock");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Os,[Object(o["createVNode"])(c,{"content-title":e.translate("UsersManager_NewsletterSignupTitle")},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"checkbox",name:"newsletterSignupCheckbox",id:"newsletterSignupCheckbox",modelValue:e.newsletterSignupCheckbox,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.newsletterSignupCheckbox=t}),"full-width":!0,title:e.signupTitleText},null,8,["modelValue","title"])]),Object(o["createVNode"])(l,{id:"newsletterSignupBtn",onConfirm:t[1]||(t[1]=function(t){return e.signupForNewsletter()}),disabled:!e.newsletterSignupCheckbox,value:e.newsletterSignupButtonTitle,saving:e.isProcessingNewsletterSignup},null,8,["disabled","value","saving"])]})),_:1},8,["content-title"])],512)),[[o["vShow"],e.showNewsletterSignup]])}var vs=Object(o["defineComponent"])({data:function(){return{showNewsletterSignup:!0,newsletterSignupCheckbox:!1,isProcessingNewsletterSignup:!1,newsletterSignupButtonTitle:Object(g["translate"])("General_Save")}},components:{ContentBlock:g["ContentBlock"],SaveButton:f["SaveButton"],Field:f["Field"]},computed:{signupTitleText:function(){return Object(g["translate"])("UsersManager_NewsletterSignupMessage",'',"")}},methods:{signupForNewsletter:function(){var e=this;this.newsletterSignupButtonTitle=Object(g["translate"])("General_Loading"),this.isProcessingNewsletterSignup=!0,g["AjaxHelper"].fetch({module:"API",method:"UsersManager.newsletterSignup"},{withTokenInUrl:!0}).then((function(){e.isProcessingNewsletterSignup=!1,e.showNewsletterSignup=!1;var t=g["NotificationsStore"].show({message:Object(g["translate"])("UsersManager_NewsletterSignupSuccessMessage"),id:"newslettersignup",context:"success",type:"transient"});g["NotificationsStore"].scrollToNotification(t)})).catch((function(){e.isProcessingNewsletterSignup=!1;var t=g["NotificationsStore"].show({message:Object(g["translate"])("UsersManager_NewsletterSignupFailureMessage"),id:"newslettersignup",context:"error",type:"transient"});g["NotificationsStore"].scrollToNotification(t),e.newsletterSignupButtonTitle=Object(g["translate"])("General_PleaseTryAgain")}))}}});vs.render=js;var Cs=vs,ys={id:"userSettingsTable"},ks={key:0},Ns={id:"languageHelp",class:"inline-help-node"},Ss={target:"_blank",rel:"noreferrer noopener",href:"https://matomo.org/translations/"},Vs={class:"sites_autocomplete"};function Us(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SiteSelector"),c=Object(o["resolveComponent"])("SaveButton"),d=Object(o["resolveComponent"])("PasswordConfirmation"),u=Object(o["resolveComponent"])("ContentBlock"),m=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(u,{"content-title":e.title,feature:"true"},{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("form",ys,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"text",name:"username",title:e.translate("General_Username"),disabled:!0,modelValue:e.username,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.username=t}),"inline-help":e.translate("UsersManager_YourUsernameCannotBeChanged")},null,8,["title","modelValue","inline-help"])]),e.isUsersAdminEnabled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ks,[Object(o["createVNode"])(a,{uicontrol:"text",name:"email","model-value":e.email,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.email=t,e.doesRequirePasswordConfirmation=!0}),maxlength:100,title:e.translate("UsersManager_Email")},null,8,["model-value","title"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Ns,[Object(o["createElementVNode"])("a",Ss,Object(o["toDisplayString"])(e.translate("LanguagesManager_AboutPiwikTranslations")),1)]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"language",modelValue:e.language,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.language=t}),title:e.translate("General_Language"),options:e.languageOptions,"inline-help":"#languageHelp"},null,8,["modelValue","title","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"timeformat",modelValue:e.timeformat,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.timeformat=t}),title:e.translate("General_TimeFormat"),options:e.timeFormats},null,8,["modelValue","title","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"defaultReport",modelValue:e.theDefaultReport,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.theDefaultReport=t}),introduction:e.translate("UsersManager_ReportToLoadByDefault"),title:e.translate("General_AllWebsitesDashboard"),options:e.defaultReportOptions},null,8,["modelValue","introduction","title","options"])]),Object(o["createElementVNode"])("div",Vs,[Object(o["createVNode"])(l,{modelValue:e.site,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.site=t}),"show-selected-site":!0,"switch-site-on-select":!1,"show-all-sites-item":!1,showselectedsite:!0,id:"defaultReportSiteSelector"},null,8,["modelValue"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"defaultDate",modelValue:e.theDefaultDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.theDefaultDate=t}),introduction:e.translate("UsersManager_ReportDateToLoadByDefault"),options:e.availableDefaultDates},null,8,["modelValue","introduction","options"])]),Object(o["createVNode"])(c,{onConfirm:t[7]||(t[7]=function(t){return e.save()}),saving:e.loading},null,8,["saving"]),Object(o["createVNode"])(d,{modelValue:e.showPasswordConfirmation,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.showPasswordConfirmation=t}),onConfirmed:e.doSave},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])],512),[[m]])]})),_:1},8,["content-title"])}var Es=Object(o["defineComponent"])({props:{isUsersAdminEnabled:{type:Boolean,required:!0},title:{type:String,required:!0},userLogin:{type:String,required:!0},userEmail:{type:String,required:!0},currentLanguageCode:{type:String,required:!0},languageOptions:{type:Object,required:!0},currentTimeformat:{type:Number,required:!0},timeFormats:{type:Object,required:!0},defaultReport:{type:[String,Number],required:!0},defaultReportOptions:{type:Object,required:!0},defaultReportIdSite:{type:[String,Number],required:!0},defaultReportSiteName:{type:String,required:!0},defaultDate:{type:String,required:!0},availableDefaultDates:{type:Object,required:!0}},components:{ContentBlock:g["ContentBlock"],SaveButton:f["SaveButton"],Field:f["Field"],SiteSelector:g["SiteSelector"],PasswordConfirmation:f["PasswordConfirmation"]},directives:{Form:f["Form"]},data:function(){return{doesRequirePasswordConfirmation:!1,username:this.userLogin,email:this.userEmail,language:this.currentLanguageCode,timeformat:this.currentTimeformat,theDefaultReport:this.defaultReport,site:{id:this.defaultReportIdSite,name:g["Matomo"].helper.htmlDecode(this.defaultReportSiteName)},theDefaultDate:this.defaultDate,loading:!1,showPasswordConfirmation:!1}},methods:{save:function(){this.doesRequirePasswordConfirmation?this.showPasswordConfirmation=!0:this.doSave()},doSave:function(e){var t=this,n={email:this.email,defaultReport:"MultiSites"===this.theDefaultReport?this.theDefaultReport:this.site.id,defaultDate:this.theDefaultDate,language:this.language,timeformat:this.timeformat};e&&(n.passwordConfirmation=e),this.loading=!0,g["AjaxHelper"].post({module:"UsersManager",action:"recordUserSettings",format:"json"},n,{withTokenInUrl:!0}).then((function(){var e=g["NotificationsStore"].show({message:Object(g["translate"])("CoreAdminHome_SettingsSaveSuccess"),id:"PersonalSettingsSuccess",context:"success",type:"transient"});g["NotificationsStore"].scrollToNotification(e),t.doesRequirePasswordConfirmation=!1,t.loading=!1})).catch((function(){t.loading=!1}))}}});Es.render=Us;var ws=Es,As={key:0},Ts={key:1,class:"alert alert-danger"},Ms=["action"],Bs=["value"],_s=["value"],Ds=["innerHTML"];function xs(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("ContentBlock");return Object(o["openBlock"])(),Object(o["createBlock"])(l,{"content-title":e.translate("UsersManager_AuthTokens")},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_TokenAuthIntro")),1),e.noDescription?(Object(o["openBlock"])(),Object(o["createElementBlock"])("br",As)):Object(o["createCommentVNode"])("",!0),e.noDescription?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ts,Object(o["toDisplayString"])(e.translate("General_Description"))+": "+Object(o["toDisplayString"])(e.translate("General_ValidatorErrorEmptyValue")),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("form",{action:e.addNewTokenFormUrl,method:"post",class:"addTokenForm"},[Object(o["createVNode"])(a,{uicontrol:"text",name:"description",title:e.translate("General_Description"),maxlength:100,required:!0,"inline-help":e.translate("UsersManager_AuthTokenPurpose"),modelValue:e.tokenDescription,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.tokenDescription=t})},null,8,["title","inline-help","modelValue"]),Object(o["createVNode"])(a,{uicontrol:"checkbox",name:"secure_only",title:e.translate("UsersManager_OnlyAllowSecureRequests"),required:!1,"inline-help":e.secureOnlyHelp,modelValue:e.tokenSecureOnly,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.tokenSecureOnly=t}),disabled:e.forceSecureOnlyCalc},null,8,["title","inline-help","modelValue","disabled"]),Object(o["createElementVNode"])("input",{type:"hidden",value:e.formNonce,name:"nonce"},null,8,Bs),Object(o["createElementVNode"])("input",{type:"submit",value:e.translate("UsersManager_CreateNewToken"),class:"btn",style:{"margin-right":"3.5px"}},null,8,_s),Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.cancelLink)},null,8,Ds)],8,Ms)]})),_:1},8,["content-title"])}var Ls=Object(o["defineComponent"])({props:{formNonce:String,noDescription:Boolean,forceSecureOnly:Boolean},components:{ContentBlock:g["ContentBlock"],Field:f["Field"]},data:function(){return{tokenDescription:"",tokenSecureOnly:!0}},computed:{addNewTokenFormUrl:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"addNewToken"})))},cancelLink:function(){var e="?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"userSecurity"})));return Object(g["translate"])("General_OrCancel",""),"")},forceSecureOnlyCalc:function(){return this.forceSecureOnly},secureOnlyHelp:function(){return this.forceSecureOnly?Object(g["translate"])("UsersManager_AuthTokenSecureOnlyHelpForced"):Object(g["translate"])("UsersManager_AuthTokenSecureOnlyHelp")}}});Ls.render=xs;var Rs=Ls,Ps=Object(o["createElementVNode"])("br",null,null,-1),Fs={style:{"font-size":"40px"},class:"generatedTokenAuth"},Hs=["href"];function Is(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("ContentBlock"),l=Object(o["resolveDirective"])("copy-to-clipboard");return Object(o["openBlock"])(),Object(o["createBlock"])(a,{"content-title":e.translate("UsersManager_TokenSuccessfullyGenerated")},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("p",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_PleaseStoreToken"))+" ",1),Ps,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_DoNotStoreToken")),1)]),Object(o["createElementVNode"])("div",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("pre",Fs,[Object(o["createElementVNode"])("code",null,Object(o["toDisplayString"])(e.generatedToken),1)],512),[[l,{}]])]),Object(o["createElementVNode"])("a",{href:e.userSecurityLink,class:"btn",style:{height:"auto"}},Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmTokenCopied"))+" "+Object(o["toDisplayString"])(e.translate("UsersManager_GoBackSecurityPage")),9,Hs)]})),_:1},8,["content-title"])}var qs=Object(o["defineComponent"])({props:{generatedToken:{type:String,required:!0}},components:{ContentBlock:g["ContentBlock"]},directives:{CopyToClipboard:g["CopyToClipboard"]},computed:{userSecurityLink:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"userSecurity"})))}}});qs.render=Is;var $s=qs,Gs=["action"],zs=["value"],Ws={key:0},Ys={class:"alert alert-info"},Xs=["value"],Js={key:1},Ks={class:"alert alert-danger"},Qs=["innerHTML"],Zs={ref:"afterPassword"},er=Object(o["createElementVNode"])("a",{name:"authtokens",id:"authtokens"},null,-1),tr={key:0},nr={class:"listAuthTokens"},sr=["title"],rr={key:0},or=["colspan","innerHTML"],ir={class:"creationDate"},ar=["title"],lr=["action"],cr=["value"],dr=["value"],ur=["title"],mr=Object(o["createElementVNode"])("span",{class:"icon-delete"},null,-1),br=[mr],pr={class:"tableActionBar"},gr=["href"],fr=Object(o["createElementVNode"])("span",{class:"icon-add"},null,-1),hr=["action"],Or=["value"],jr=Object(o["createElementVNode"])("input",{name:"idtokenauth",type:"hidden",value:"all"},null,-1),vr={type:"submit",class:"table-action"},Cr=Object(o["createElementVNode"])("span",{class:"icon-delete"},null,-1);function yr(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("ContentBlock"),c=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[e.isUsersAdminEnabled?(Object(o["openBlock"])(),Object(o["createBlock"])(l,{key:0,"content-title":e.translate("General_ChangePassword"),feature:"true"},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("form",{id:"userSettingsTable",method:"post",action:e.recordPasswordChangeAction},[Object(o["createElementVNode"])("input",{type:"hidden",value:e.changePasswordNonce,name:"nonce"},null,8,zs),e.isValidHost?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ws,[Object(o["createVNode"])(a,{uicontrol:"password",name:"password",autocomplete:!1,modelValue:e.password,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.password=t}),title:e.translate("Login_NewPassword"),"inline-help":e.translate("UsersManager_IfYouWouldLikeToChangeThePasswordTypeANewOne")},null,8,["modelValue","title","inline-help"]),Object(o["createVNode"])(a,{uicontrol:"password",name:"passwordBis",autocomplete:!1,modelValue:e.passwordBis,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.passwordBis=t}),title:e.translate("Login_NewPasswordRepeat"),"inline-help":e.translate("UsersManager_TypeYourPasswordAgain")},null,8,["modelValue","title","inline-help"]),Object(o["createVNode"])(a,{uicontrol:"password",name:"passwordConfirmation",autocomplete:!1,modelValue:e.passwordConfirmation,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.passwordConfirmation=t}),title:e.translate("UsersManager_YourCurrentPassword"),"inline-help":e.translate("UsersManager_TypeYourCurrentPassword")},null,8,["modelValue","title","inline-help"]),Object(o["createElementVNode"])("div",Ys,Object(o["toDisplayString"])(e.translate("UsersManager_PasswordChangeTerminatesOtherSessions")),1),Object(o["createElementVNode"])("input",{type:"submit",value:e.translate("General_Save"),class:"btn"},null,8,Xs)])):Object(o["createCommentVNode"])("",!0),e.isValidHost?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Js,[Object(o["createElementVNode"])("div",Ks,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_InjectedHostCannotChangePwd",e.invalidHost))+" ",1),e.isSuperUser?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.emailYourAdminText)},null,8,Qs))])]))],8,Gs)]})),_:1},8,["content-title"])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Zs,[e.isUsersAdminEnabled&&e.afterPasswordComponent?(Object(o["openBlock"])(),Object(o["createBlock"])(Object(o["resolveDynamicComponent"])(e.afterPasswordComponent),{key:0})):Object(o["createCommentVNode"])("",!0)],512),er,Object(o["createVNode"])(l,{"content-title":e.translate("UsersManager_AuthTokens")},{default:Object(o["withCtx"])((function(){var t,n;return[Object(o["createElementVNode"])("p",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_TokenAuthIntro"))+" ",1),e.hasTokensWithExpireDate?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",tr,Object(o["toDisplayString"])(e.translate("UsersManager_ExpiredTokensDeleteAutomatically")),1)):Object(o["createCommentVNode"])("",!0)]),Object(o["withDirectives"])(Object(o["createElementVNode"])("table",nr,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_CreationDate")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_Description")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("UsersManager_LastUsed")),1),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("UsersManager_SecureOnly")),1),e.hasTokensWithExpireDate?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:0,title:e.translate("UsersManager_TokensWithExpireDateCreationBySystem")},Object(o["toDisplayString"])(e.translate("UsersManager_ExpireDate")),9,sr)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_Actions")),1)])]),Object(o["createElementVNode"])("tbody",null,[null!==(t=e.tokens)&&void 0!==t&&t.length?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",rr,[Object(o["createElementVNode"])("td",{colspan:e.hasTokensWithExpireDate?5:4,innerHTML:e.$sanitize(e.noTokenCreatedYetText)},null,8,or)])),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.tokens||[],(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:t.idusertokenauth},[Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("span",ir,Object(o["toDisplayString"])(t.date_created),1)]),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(t.description),1),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(t.last_used?t.last_used:e.translate("General_Never")),1),Object(o["createElementVNode"])("td",null,Object(o["toDisplayString"])(1===parseInt(t.secure_only,10)?e.translate("General_Yes"):e.translate("General_No")),1),e.hasTokensWithExpireDate?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",{key:0,title:e.translate("UsersManager_TokensWithExpireDateCreationBySystem")},Object(o["toDisplayString"])(t.date_expired?t.date_expired:e.translate("General_Never")),9,ar)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("form",{method:"post",action:e.deleteTokenAction,style:{display:"inline"}},[Object(o["createElementVNode"])("input",{name:"nonce",type:"hidden",value:e.deleteTokenNonce},null,8,cr),Object(o["createElementVNode"])("input",{name:"idtokenauth",type:"hidden",value:t.idusertokenauth},null,8,dr),Object(o["createElementVNode"])("button",{type:"submit",class:"table-action",title:e.translate("General_Delete")},br,8,ur)],8,lr)])])})),128))])],512),[[c]]),Object(o["createElementVNode"])("div",pr,[Object(o["createElementVNode"])("a",{href:e.addNewTokenLink,class:"addNewToken"},[fr,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_CreateNewToken")),1)],8,gr),null!==(n=e.tokens)&&void 0!==n&&n.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("form",{key:0,method:"post",action:e.deleteTokenAction,style:{display:"inline"}},[Object(o["createElementVNode"])("input",{name:"nonce",type:"hidden",value:e.deleteTokenNonce},null,8,Or),jr,Object(o["createElementVNode"])("button",vr,[Cr,Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_DeleteAllTokens")),1)])],8,hr)):Object(o["createCommentVNode"])("",!0)])]})),_:1},8,["content-title"])])}var kr=Object(o["defineComponent"])({props:{deleteTokenNonce:String,tokens:Array,hasTokensWithExpireDate:Boolean,isUsersAdminEnabled:Boolean,changePasswordNonce:String,isValidHost:Boolean,isSuperUser:Boolean,invalidHost:String,afterPasswordEventContent:String,invalidHostMailLinkStart:String},components:{ContentBlock:g["ContentBlock"],Field:f["Field"]},directives:{ContentTable:g["ContentTable"]},data:function(){return{password:"",passwordBis:"",passwordConfirmation:""}},mounted:function(){var e=this.$refs.afterPassword;g["Matomo"].helper.compileVueEntryComponents(e)},computed:{recordPasswordChangeAction:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"recordPasswordChange"})))},emailYourAdminText:function(){return Object(g["translate"])("UsersManager_EmailYourAdministrator",this.invalidHostMailLinkStart||"","")},noTokenCreatedYetText:function(){var e="?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"addNewToken"})));return Object(g["translate"])("UsersManager_NoTokenCreatedYetCreateNow",''),"")},deleteTokenAction:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"deleteToken"})))},addNewTokenLink:function(){return"?".concat(g["MatomoUrl"].stringify(Object.assign(Object.assign({},g["MatomoUrl"].urlParsed.value),{},{module:"UsersManager",action:"addNewToken"})))},afterPasswordComponent:function(){if(!this.afterPasswordEventContent)return null;var e=this.$refs.afterPassword;return Object(o["markRaw"])({template:this.afterPasswordEventContent,beforeUnmount:function(){g["Matomo"].helper.destroyVueComponent(e)}})}}});kr.render=yr;var Nr=kr,Sr=["innerHTML"],Vr={style:{"margin-left":"20px"}},Ur=["href"],Er=Object(o["createElementVNode"])("br",null,null,-1);function wr(e,t,n,s,r,i){var a=Object(o["resolveComponent"])("PersonalSettings"),l=Object(o["resolveComponent"])("NewsletterSettings"),c=Object(o["resolveComponent"])("PluginSettings"),d=Object(o["resolveComponent"])("ContentBlock");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",null,[Object(o["createVNode"])(a,{"is-users-admin-enabled":e.isUsersAdminEnabled,title:e.title,"user-login":e.userLogin,"user-email":e.userEmail,"current-language-code":e.currentLanguageCode,"language-options":e.languageOptions,"current-timeformat":e.currentTimeformat,"time-formats":e.timeFormats,"default-report":e.defaultReport,"default-report-options":e.defaultReportOptions,"default-report-id-site":e.defaultReportIdSite,"default-report-site-name":e.defaultReportSiteName,"default-date":e.defaultDate,"available-default-dates":e.availableDefaultDates},null,8,["is-users-admin-enabled","title","user-login","user-email","current-language-code","language-options","current-timeformat","time-formats","default-report","default-report-options","default-report-id-site","default-report-site-name","default-date","available-default-dates"]),e.showNewsletterSignup?(Object(o["openBlock"])(),Object(o["createBlock"])(l,{key:0})):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(c,{mode:"user"}),Object(o["createVNode"])(d,{"content-title":e.translate("UsersManager_ExcludeVisitsViaCookie")},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("p",{innerHTML:e.$sanitize(e.yourVisitsAreText)},null,8,Sr),Object(o["createElementVNode"])("span",Vr,[Object(o["createElementVNode"])("a",{href:e.setIgnoreCookieLink},[Object(o["createTextVNode"])(" › "+Object(o["toDisplayString"])(e.ignoreCookieSet?e.translate("UsersManager_ClickHereToDeleteTheCookie"):e.translate("UsersManager_ClickHereToSetTheCookieOnDomain",e.piwikHost))+" ",1),Er],8,Ur)])]})),_:1},8,["content-title"])])}var Ar=Object(o["defineComponent"])({props:{isUsersAdminEnabled:{type:Boolean,required:!0},title:{type:String,required:!0},userLogin:{type:String,required:!0},userEmail:{type:String,required:!0},currentLanguageCode:{type:String,required:!0},languageOptions:{type:Object,required:!0},currentTimeformat:{type:Number,required:!0},timeFormats:{type:Object,required:!0},defaultReport:{type:[String,Number],required:!0},defaultReportOptions:{type:Object,required:!0},defaultReportIdSite:{type:[String,Number],required:!0},defaultReportSiteName:{type:String,required:!0},defaultDate:{type:String,required:!0},availableDefaultDates:{type:Object,required:!0},showNewsletterSignup:Boolean,ignoreCookieSet:Boolean,ignoreSalt:[String,Number,Boolean],piwikHost:{type:String,required:!0}},components:{ContentBlock:g["ContentBlock"],PersonalSettings:ws,NewsletterSettings:Cs,PluginSettings:f["PluginSettings"]},computed:{yourVisitsAreText:function(){return this.ignoreCookieSet?Object(g["translate"])("UsersManager_YourVisitsAreIgnoredOnDomain","",this.piwikHost,""):Object(g["translate"])("UsersManager_YourVisitsAreNotIgnored","","")},setIgnoreCookieLink:function(){return"?".concat(g["MatomoUrl"].stringify({ignoreSalt:this.ignoreSalt,module:"UsersManager",action:"setIgnoreCookie"}),"#excludeCookie")}}});Ar.render=wr;var Tr=Ar; /*! * Matomo - free/libre analytics platform * diff --git a/plugins/UsersManager/vue/src/AddNewToken/AddNewToken.vue b/plugins/UsersManager/vue/src/AddNewToken/AddNewToken.vue index 8b0d676089f..478e1b835cd 100644 --- a/plugins/UsersManager/vue/src/AddNewToken/AddNewToken.vue +++ b/plugins/UsersManager/vue/src/AddNewToken/AddNewToken.vue @@ -33,11 +33,11 @@ @@ -61,14 +61,14 @@ import { Field } from 'CorePluginsAdmin'; interface AddNewTokenState { tokenDescription: string; - tokenPostOnly: boolean; + tokenSecureOnly: boolean; } export default defineComponent({ props: { formNonce: String, noDescription: Boolean, - forcePostOnly: Boolean, + forceSecureOnly: Boolean, }, components: { ContentBlock, @@ -77,7 +77,7 @@ export default defineComponent({ data(): AddNewTokenState { return { tokenDescription: '', - tokenPostOnly: true, + tokenSecureOnly: true, }; }, computed: { @@ -101,11 +101,11 @@ export default defineComponent({ '', ); }, - forcePostOnlyCalc() { - return this.forcePostOnly; + forceSecureOnlyCalc() { + return this.forceSecureOnly; }, - postOnlyHelp() { - return (this.forcePostOnly ? translate('UsersManager_AuthTokenSecureOnlyHelpForced') + secureOnlyHelp() { + return (this.forceSecureOnly ? translate('UsersManager_AuthTokenSecureOnlyHelpForced') : translate('UsersManager_AuthTokenSecureOnlyHelp')); }, }, diff --git a/plugins/UsersManager/vue/src/UserSecurity/UserSecurity.vue b/plugins/UsersManager/vue/src/UserSecurity/UserSecurity.vue index 8a734a02ac3..35b945963f4 100644 --- a/plugins/UsersManager/vue/src/UserSecurity/UserSecurity.vue +++ b/plugins/UsersManager/vue/src/UserSecurity/UserSecurity.vue @@ -87,7 +87,7 @@ {{ translate('General_CreationDate') }} {{ translate('General_Description') }} {{ translate('UsersManager_LastUsed') }} - {{ translate('UsersManager_PostOnly') }} + {{ translate('UsersManager_SecureOnly') }}