2 lines
43 KiB
JavaScript
2 lines
43 KiB
JavaScript
(function(t){function e(e){for(var r,n,s=e[0],l=e[1],u=e[2],d=0,_=[];d<s.length;d++)n=s[d],Object.prototype.hasOwnProperty.call(i,n)&&i[n]&&_.push(i[n][0]),i[n]=0;for(r in l)Object.prototype.hasOwnProperty.call(l,r)&&(t[r]=l[r]);c&&c(e);while(_.length)_.shift()();return a.push.apply(a,u||[]),o()}function o(){for(var t,e=0;e<a.length;e++){for(var o=a[e],r=!0,s=1;s<o.length;s++){var l=o[s];0!==i[l]&&(r=!1)}r&&(a.splice(e--,1),t=n(n.s=o[0]))}return t}var r={},i={app:0},a=[];function n(e){if(r[e])return r[e].exports;var o=r[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=r,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/lib/authenticationSources/";var s=window["webpackJsonp"]=window["webpackJsonp"]||[],l=s.push.bind(s);s.push=e,s=s.slice();for(var u=0;u<s.length;u++)e(s[u]);var c=l;a.push([0,"chunk-vendors"]),o()})({0:function(t,e,o){t.exports=o("56d7")},"56d7":function(t,e,o){"use strict";o.r(e);var r=o("2b0e"),i=o("5f5b"),a=o("b1e0"),n=(o("f9e3"),o("2dd8"),o("9ebe")),s=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"app"}},[e("authenticationSources",{directives:[{name:"show",rawName:"v-show",value:t.views.authenticationSources,expression:"views.authenticationSources"}],ref:"authenticationSources",on:{newConnection:t.newConnection,editSettings:t.editSettings,optionSaveButton:t.optionSaveButton,optionUpdateButton:t.optionUpdateButton,optionNewButton:t.optionNewButton}}),e("newConnection",{directives:[{name:"show",rawName:"v-show",value:t.views.newConnection,expression:"views.newConnection"}],ref:"newConnection",on:{matchAttributesToSync:t.matchAttributesToSync,save:t.saveNewConnection,cancel:function(e){return t.showView("authenticationSources")}}}),e("matchAttributes",{directives:[{name:"show",rawName:"v-show",value:t.views.matchAttributes,expression:"views.matchAttributes"}],ref:"matchAttributes",on:{connectionSettings:t.connectionSettings,addAttribute:t.addAttribute,editAttribute:t.editAttribute}}),e("newMatchedAttribute",{directives:[{name:"show",rawName:"v-show",value:t.views.newMatchedAttribute,expression:"views.newMatchedAttribute"}],ref:"newMatchedAttribute",on:{save:t.saveNewMatchedAttribute,cancel:t.cancelNewMatchedAttribute}})],1)},l=[],u=function(){var t=this,e=t._self._c;return e("div",[e("titleSection",{attrs:{title:t.$root.translation("ID_AUTH_SOURCES")}}),e("b-form-group",{staticClass:"float-right"},[e("b-button",{attrs:{variant:"primary"},on:{click:function(e){return t.$refs["as-b-modal-upload-file"].show()}}},[e("b-icon",{attrs:{icon:"arrow-up-short","aria-hidden":"true"}}),t._v(" "+t._s(t.$root.translation("ID_IMPORT_CONNECTION"))+" ")],1),t._v(" "),e("b-button",{attrs:{variant:"success"},on:{click:function(e){return t.$emit("newConnection")}}},[e("b-icon",{attrs:{icon:"plus","aria-hidden":"true"}}),t._v(" "+t._s(t.$root.translation("ID_NEW_CONNECTION"))+" ")],1)],1),e("v-server-table",{ref:"vServerTable1",attrs:{url:t.baseUrl,columns:t.columns,options:t.options,data:t.tableData},scopedSlots:t._u([{key:"icons",fn:function(o){return e("div",{},[e("b-button",{staticClass:"mb-2",attrs:{id:"as-b-button-tooltip-"+o.index,variant:"light",size:"sm"},on:{mousedown:function(e){t.$root.$emit("bv::hide::tooltip"),t.$root.$emit("bv::show::tooltip","as-b-button-tooltip-"+o.index)},mouseup:function(e){t.$root.$emit("bv::hide::tooltip"),t.$root.$emit("bv::show::tooltip","as-b-button-tooltip-"+o.index)}}},[e("b-icon",{attrs:{icon:"three-dots-vertical","aria-hidden":"true"}})],1),e("b-tooltip",{attrs:{target:"as-b-button-tooltip-"+o.index,triggers:"hover","custom-class":"custom-tooltip",placement:"left",variant:"light","no-fade":""}},[e("b-button-group",[e("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:t.$root.translation("ID_IMPORT_USERS"),variant:"light"},on:{click:function(e){return t.importUsers(o.row)}}},[e("b-icon",{attrs:{icon:"arrow-repeat","aria-hidden":"true",variant:"success"}})],1),e("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:t.$root.translation("ID_DOWNLOAD_SETTINGS"),variant:"light"},on:{click:function(e){return t.downloadRow(o.row)}}},[e("b-icon",{attrs:{icon:"arrow-down","aria-hidden":"true",variant:"info"}})],1),e("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:t.$root.translation("ID_GROUPS_SYNCHRONIZE"),variant:"light"},on:{click:function(e){return t.syncGroups(o.row)}}},[e("b-icon",{attrs:{icon:"people-fill","aria-hidden":"true",variant:"warning"}})],1),e("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:t.$root.translation("ID_DEPARTMENTS_SYNCHRONIZE"),variant:"light"},on:{click:function(e){return t.syncDepartments(o.row)}}},[e("b-icon",{attrs:{icon:"diagram3-fill","aria-hidden":"true",variant:"warning"}})],1),e("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:t.$root.translation("ID_EDIT_SETTINGS"),variant:"light"},on:{click:function(e){return t.$emit("editSettings",o.row)}}},[e("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"info"}})],1),e("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:t.$root.translation("ID_DELETE_SETTINGS"),variant:"light"},on:{click:function(e){return t.deleteRow(o.row)}}},[e("b-icon",{attrs:{icon:"trash","aria-hidden":"true",variant:"danger"}})],1)],1)],1)],1)}}])}),e("b-modal",{ref:"as-b-modal-upload-file",attrs:{title:t.$root.translation("ID_UPLOAD_CONNECTION_SETTINGS"),"hide-footer":"",size:"lg"}},[e("formUploadSource",{ref:"formUploadSource",on:{cancel:function(e){t.$refs["as-b-modal-upload-file"].hide(),t.$refs.formUploadSource.reset()},optionSaveButton:t.optionSaveButton,optionUpdateButton:t.optionUpdateButton,optionNewButton:t.optionNewButton}})],1)],1)},c=[],d=(o("14d9"),o("88a7"),o("271a"),o("5494"),function(){var t=this,e=t._self._c;return e("div",[e("h3",{staticClass:"text-primary"},[t._v(" "+t._s(t.title)+" ")])])}),_=[],f={props:{title:String}},p=f,b=o("2877"),h=Object(b["a"])(p,d,_,!1,null,"4605384b",null),m=h.exports,S=function(){var t=this,e=t._self._c;return e("div",[e("b-form",{on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.onSave.apply(null,arguments)}}},[e("b-container",{attrs:{fluid:""}},[e("b-row",[e("b-col",[1==t.newName?e("b-form-group",{attrs:{label:t.$root.translation("ID_PLEASE_ADD_THE_FILE_SETTINGS_TO_BE_UPLOADED")}},[e("b-form-file",{attrs:{state:t.validateState("connectionSettings"),placeholder:t.$root.translation("ID_CHOOSE_A_FILE_OR_DROP_IT_HERE"),"drop-placeholder":t.$root.translation("ID_DROP_FILE_HERE")},on:{change:t.change},model:{value:t.form.connectionSettings,callback:function(e){t.$set(t.form,"connectionSettings",e)},expression:"form.connectionSettings"}}),e("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1):e("b-form-group",{attrs:{label:t.$root.translation("ID_CONNECTION_WITH_THE_SAME_NAME_PLEASE_SELECT_AN_OPTION",[t.fileContent.AUTH_SOURCE_NAME])}},[e("b-form-file",{attrs:{state:t.validateState("connectionSettings"),placeholder:t.$root.translation("ID_CHOOSE_A_FILE_OR_DROP_IT_HERE"),"drop-placeholder":t.$root.translation("ID_DROP_FILE_HERE")},on:{change:t.change},model:{value:t.form.connectionSettings,callback:function(e){t.$set(t.form,"connectionSettings",e)},expression:"form.connectionSettings"}}),e("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1)],1)],1),e("b-row",{staticClass:"text-center"},[e("b-col",[1==t.newName?e("b-form-group",[e("b-button",{attrs:{variant:"danger"},on:{click:function(e){return t.$emit("cancel")}}},[t._v(t._s(t.$root.translation("ID_CANCEL")))]),t._v(" "),e("b-button",{attrs:{type:"submit",variant:"success",disabled:t.isDisabled,id:"save"}},[t._v(t._s(t.$root.translation("ID_SAVE")))])],1):e("b-form-group",[e("b-button",{attrs:{variant:"danger"},on:{click:function(e){return t.$emit("cancel")}}},[t._v(t._s(t.$root.translation("ID_CANCEL")))]),t._v(" "),e("b-button",{attrs:{type:"submit",variant:"primary",disabled:t.isDisabled,id:"update"}},[t._v(t._s(t.$root.translation("ID_UPDATE_SETTINGS")))]),t._v(" "),e("b-button",{attrs:{type:"submit",variant:"success",disabled:t.isDisabled,id:"new"}},[t._v(t._s(t.$root.translation("ID_NEW_CONNECTION")))])],1)],1)],1)],1)],1),e("b-modal",{attrs:{id:"messageForInvalidFileExtension","ok-only":"",static:""}},[t._v(t._s(t.$root.translation("ID_PMG_SELECT_FILE")))]),e("b-modal",{attrs:{id:"messageForInvalidFileFormat","ok-only":"",static:""}},[t._v(t._s(t.$root.translation("ID_INVALID_DATA")))])],1)},E=[],R=o("1dce"),I=o("b5ae"),T=o("bc3a"),U=o.n(T),A={mixins:[R["validationMixin"]],props:{skipNameValidation:Boolean},components:{},validations:{form:{connectionSettings:{required:I["required"]}}},data(){return{form:{connectionSettings:[]},fileContent:{},isDisabled:!0,validationResult:{},newName:!0}},methods:{validateState(t){const{$dirty:e,$error:o}=this.$v.form[t];return e?!o:null},onSave(t){this.$v.form.$touch(),this.$v.form.$anyError||("save"===t.submitter.id&&this.$emit("optionSaveButton",this.fileContent),"update"===t.submitter.id&&this.$emit("optionUpdateButton",this.fileContent,this.validationResult.row),"new"===t.submitter.id&&(this.fileContent.AUTH_SOURCE_NAME=this.validationResult.suggestName,this.$emit("optionNewButton",this.fileContent)))},reset(){this.newName=!0,this.validationResult={},this.form.connectionSettings=[]},change(t){let e=t.target;if(e.files.length<=0)return;let o=e.files[0];if(o.name.indexOf(".json")<0)return this.$bvModal.show("messageForInvalidFileExtension"),this.reset(),void(this.isDisabled=!0);let r=new FileReader;r.readAsText(o,"UTF-8"),r.onload=t=>{if(this.fileContent=JSON.parse(t.target.result),!("AUTH_SOURCE_NAME"in this.fileContent))return this.$bvModal.show("messageForInvalidFileFormat"),this.reset(),void(this.isDisabled=!0);if(!0===this.skipNameValidation)return void(this.isDisabled=!1);let e=new FormData;e.append("AUTH_SOURCE_NAME",this.fileContent.AUTH_SOURCE_NAME),U.a.post(this.$root.baseUrl()+"authSources/authSourcesProxy.php?action=authSourcesVerifyName",e).then(t=>{this.newName=!1===t.data.row,this.validationResult=t.data,this.isDisabled=!1}).catch(t=>{this.isDisabled=!0}).finally(()=>{})},r.onerror=()=>{}}}},v=A,C=Object(b["a"])(v,S,E,!1,null,"d2fa09b4",null),O=C.exports,D={components:{titleSection:m,formUploadSource:O},data(){return{baseUrl:this.$root.baseUrl()+"authSources/authSourcesProxy?action=authSourcesList",columns:["AUTH_SOURCE_NAME","AUTH_SOURCE_PROVIDER","AUTH_SOURCE_SERVER_NAME","AUTH_SOURCE_PORT","AUTH_SOURCE_ENABLED_TLS_LABEL","CURRENT_USERS","icons"],options:{headings:{AUTH_SOURCE_NAME:this.$root.translation("ID_NAME"),AUTH_SOURCE_PROVIDER:this.$root.translation("ID_PROVIDER"),AUTH_SOURCE_SERVER_NAME:this.$root.translation("ID_SERVER_NAME"),AUTH_SOURCE_PORT:this.$root.translation("ID_PORT"),AUTH_SOURCE_ENABLED_TLS_LABEL:this.$root.translation("ID_ENABLED_TLS"),CURRENT_USERS:this.$root.translation("ID_ACTIVE_USERS"),icons:""},sortable:["AUTH_SOURCE_NAME","AUTH_SOURCE_PROVIDER","AUTH_SOURCE_SERVER_NAME","AUTH_SOURCE_PORT","AUTH_SOURCE_ENABLED_TLS_LABEL","CURRENT_USERS"],filterable:["AUTH_SOURCE_NAME","AUTH_SOURCE_PROVIDER","AUTH_SOURCE_SERVER_NAME","AUTH_SOURCE_PORT","AUTH_SOURCE_ENABLED_TLS_LABEL","CURRENT_USERS"],texts:{filter:"",filterPlaceholder:this.$root.translation("ID_EMPTY_SEARCH"),count:this.$root.translation("ID_SHOWING_FROM_RECORDS_COUNT"),noResults:this.$root.translation("ID_NO_MATCHING_RECORDS"),loading:this.$root.translation("ID_LOADING_GRID")},perPage:"pageSize"in window?window.pageSize:5,perPageValues:[],sortIcon:{is:"glyphicon-sort",base:"glyphicon",up:"glyphicon-chevron-up",down:"glyphicon-chevron-down"},requestKeys:{query:"textFilter"},requestFunction(t){return t.start=(t.page-1)*t.limit,U.a.get(this.url,{params:t},{}).catch((function(t){this.dispatch("error",t)}))},responseAdapter(t){return"sources"in t.data||(t.data.sources=[]),"total_sources"in t.data||(t.data.total_sources=0),{data:t.data.sources,count:t.data.total_sources}}},tableData:[]}},methods:{refresh(){this.$refs.vServerTable1.refresh()},deleteRow(t){this.$root.$emit("bv::hide::tooltip"),this.$bvModal.msgBoxConfirm(this.$root.translation("ID_ARE_YOU_SURE_TO_DELETE_CONNECTION_PLEASE_CONFIRM",[t.AUTH_SOURCE_NAME]),{title:" ",hideHeaderClose:!1,okTitle:this.$root.translation("ID_YES"),okVariant:"success",cancelTitle:this.$root.translation("ID_NO"),cancelVariant:"danger"}).then(e=>{if(!1===e)return;let o=new FormData;o.append("action","authSourcesDelete"),o.append("auth_uid",t.AUTH_SOURCE_UID),U.a.post(this.$root.baseUrl()+"authSources/authSourcesProxy",o).then(t=>{this.refresh()}).catch(t=>{}).finally(()=>{})}).catch(t=>{})},downloadRow(t){this.$root.$emit("bv::hide::tooltip");let e=JSON.parse(JSON.stringify(t));if(e.AUTH_SOURCE_UID="",delete e.AUTH_SOURCE_PASSWORD,delete e.CURRENT_USERS,delete e["UPPER(RBAC_AUTHENTICATION_SOURCE.AUTH_SOURCE_NAME)"],delete e.AUTH_SOURCE_VERSION,delete e.AUTH_SOURCE_ATTRIBUTES,delete e.AUTH_SOURCE_OBJECT_CLASSES,delete e.AUTH_SOURCE_DATA,delete e.AUTH_SOURCE_ENABLED_TLS_LABEL,delete e.LDAP_PAGE_SIZE_LIMIT,"AUTH_SOURCE_GRID_ATTRIBUTE"in e){let t=[];for(let o in e.AUTH_SOURCE_GRID_ATTRIBUTE){let r=e.AUTH_SOURCE_GRID_ATTRIBUTE[o]||{};t.push({attributeLdap:r.attributeLdap||"",attributeUser:r.attributeUser||"",attributeRole:r.attributeRole||""})}e.AUTH_SOURCE_GRID_ATTRIBUTE=t}let o=e.AUTH_SOURCE_NAME+".json";if(window.navigator.msSaveBlob)return void window.navigator.msSaveBlob(new Blob([JSON.stringify(e)],{type:"application/octet-stream"}),o);let r=document.createElement("a");document.body.appendChild(r),r.href=window.URL.createObjectURL(new Blob([JSON.stringify(e)],{type:"application/octet-stream"})),r.download=o,r.click(),document.body.removeChild(r)},importUsers(t){location.href=this.$root.baseUrl()+"authSources/authSources_SearchUsers?sUID="+t.AUTH_SOURCE_UID},syncGroups(t){location.href=this.$root.baseUrl()+"authSources/authSourcesSynchronize?authUid="+t.AUTH_SOURCE_UID+"&tab=synchronizeGroups"},syncDepartments(t){location.href=this.$root.baseUrl()+"authSources/authSourcesSynchronize?authUid="+t.AUTH_SOURCE_UID+"&tab=synchronizeDepartments"},optionSaveButton(t){this.$refs["as-b-modal-upload-file"].hide(),this.$emit("optionSaveButton",t)},optionUpdateButton(t,e){this.$refs["as-b-modal-upload-file"].hide(),this.$emit("optionUpdateButton",t,e)},optionNewButton(t){this.$refs["as-b-modal-upload-file"].hide(),this.$emit("optionNewButton",t)}}},w=D,g=Object(b["a"])(w,u,c,!1,null,"3dc7fda5",null),N=g.exports,$=function(){var t=this,e=t._self._c;return e("div",[e("titleSection",{attrs:{title:t.title}}),e("formAuthenticationSources",{ref:"formAuthenticationSources",on:{matchAttributesToSync:function(e){return t.$emit("matchAttributesToSync",e)},cancel:t.cancel,save:function(e){return t.$emit("save",e)}}})],1)},L=[],y=function(){var t=this,e=t._self._c;return e("div",[e("b-form",{on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.onSave.apply(null,arguments)}}},[e("b-container",{attrs:{fluid:""}},[e("b-row",[e("b-col",[e("b-form-group",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],attrs:{label:t.$root.translation("ID_AVAILABLE_AUTHENTICATION_SOURCES"),description:""}},[e("b-form-select",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],attrs:{options:t.availableAuthenticationSources},model:{value:t.form.availableAuthenticationSource,callback:function(e){t.$set(t.form,"availableAuthenticationSource",e)},expression:"form.availableAuthenticationSource"}})],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_NAME")}},[e("b-form-input",{attrs:{state:t.validateState("name"),autocomplete:"off"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}}),e("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_TYPE")}},[e("b-form-select",{attrs:{options:t.types},on:{change:t.changeTypeForm},model:{value:t.form.type,callback:function(e){t.$set(t.form,"type",e)},expression:"form.type"}})],1),"ad"===t.form.type?e("b-form-group",{attrs:{label:t.$root.translation("ID_REQUIRE_SIGN_IN_POLICY_FOR_LDAP")}},[e("b-form-checkbox",{attrs:{value:"1","unchecked-value":"0"},model:{value:t.form.signInPolicyForLDAP,callback:function(e){t.$set(t.form,"signInPolicyForLDAP",e)},expression:"form.signInPolicyForLDAP"}})],1):t._e(),e("b-form-group",{attrs:{label:t.$root.translation("ID_SERVER_ADDRESS")}},[e("b-form-input",{attrs:{state:t.validateState("serverAddress"),autocomplete:"off"},model:{value:t.form.serverAddress,callback:function(e){t.$set(t.form,"serverAddress",e)},expression:"form.serverAddress"}}),e("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_PORT")}},[e("b-input-group",{scopedSlots:t._u([{key:"append",fn:function(){return[e("b-input-group-text",{staticClass:"p-0"},[e("b-button",{staticClass:"border-0",attrs:{size:"md",variant:"outline-light"},on:{click:function(e){t.disabledField.port=!t.disabledField.port}}},[e("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"primary"}})],1)],1)]},proxy:!0}])},[e("b-form-input",{attrs:{state:t.validateState("port"),disabled:t.disabledField.port,autocomplete:"off"},model:{value:t.form.port,callback:function(e){t.$set(t.form,"port",e)},expression:"form.port"}}),e("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1)],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_ENABLE_AUTOMATIC_REGISTER"),"label-cols-lg":"8"}},[e("b-form-checkbox",{attrs:{value:"1","unchecked-value":"0",switch:""},model:{value:t.form.enableAutomaticRegister,callback:function(e){t.$set(t.form,"enableAutomaticRegister",e)},expression:"form.enableAutomaticRegister"}})],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_ANONYMOUS"),"label-cols-lg":"8"}},[e("b-form-checkbox",{attrs:{value:"1","unchecked-value":"0",switch:""},model:{value:t.form.anonymous,callback:function(e){t.$set(t.form,"anonymous",e)},expression:"form.anonymous"}})],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_ENABLED_TLS"),"label-cols-lg":"8"}},[e("b-form-checkbox",{attrs:{value:"1","unchecked-value":"0",switch:""},model:{value:t.form.enableTLS,callback:function(e){t.$set(t.form,"enableTLS",e)},expression:"form.enableTLS"}})],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_BASE_DN")}},[e("b-form-input",{attrs:{placeholder:"dc=business,dc=net",autocomplete:"off"},model:{value:t.form.baseDN,callback:function(e){t.$set(t.form,"baseDN",e)},expression:"form.baseDN"}})],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_INACTIVE_USERS")}},[e("b-form-input",{attrs:{autocomplete:"off"},model:{value:t.form.inactiveUsers,callback:function(e){t.$set(t.form,"inactiveUsers",e)},expression:"form.inactiveUsers"}})],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_ROLE")}},[e("b-form-select",{attrs:{options:t.roles},model:{value:t.form.role,callback:function(e){t.$set(t.form,"role",e)},expression:"form.role"}})],1)],1),e("b-col",[e("b-form-group",{staticClass:"text-right"},[e("b-button",{attrs:{variant:"success"},on:{click:function(e){return t.$refs["fas-b-modal-upload-file"].show()}}},[t._v(t._s(t.$root.translation("ID_IMPORT_SETTINGS")))])],1),e("b-form-group",{staticClass:"text-right"},[e("b-link",{directives:[{name:"show",rawName:"v-show",value:t.showMathAttributes||t.testStatus,expression:"showMathAttributes || testStatus"}],attrs:{href:"#"},on:{click:t.matchAttributesToSync}},[t._v(t._s(t.$root.translation("ID_MATCH_ATTRIBUTES_TO_SYNC"))+" >>")])],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_USERNAME")}},[e("b-form-input",{attrs:{state:t.validateState("userName"),autocomplete:"off"},model:{value:t.form.userName,callback:function(e){t.$set(t.form,"userName",e)},expression:"form.userName"}}),e("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_PASSWORD")}},[e("b-form-input",{attrs:{state:t.validateState("password"),type:"password",autocomplete:"off"},model:{value:t.form.password,callback:function(e){t.$set(t.form,"password",e)},expression:"form.password"}}),e("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_USER_IDENTIFIER")}},[e("b-input-group",{scopedSlots:t._u([{key:"append",fn:function(){return[e("b-input-group-text",{staticClass:"p-0"},[e("b-button",{staticClass:"border-0",attrs:{size:"md",variant:"outline-light"},on:{click:function(e){t.disabledField.userIdentifier=!t.disabledField.userIdentifier}}},[e("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"primary"}})],1)],1)]},proxy:!0}])},[e("b-form-input",{attrs:{autocomplete:"off",disabled:t.disabledField.userIdentifier},model:{value:t.form.userIdentifier,callback:function(e){t.$set(t.form,"userIdentifier",e)},expression:"form.userIdentifier"}})],1)],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_GROUP_IDENTIFIER")}},[e("b-input-group",{scopedSlots:t._u([{key:"append",fn:function(){return[e("b-input-group-text",{staticClass:"p-0"},[e("b-button",{staticClass:"border-0",attrs:{size:"md",variant:"outline-light"},on:{click:function(e){t.disabledField.groupIdentifier=!t.disabledField.groupIdentifier}}},[e("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"primary"}})],1)],1)]},proxy:!0}])},[e("b-form-input",{attrs:{autocomplete:"off",disabled:t.disabledField.groupIdentifier},model:{value:t.form.groupIdentifier,callback:function(e){t.$set(t.form,"groupIdentifier",e)},expression:"form.groupIdentifier"}})],1)],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_FILTER_TO_SEARCH_USERS")}},[e("b-form-input",{attrs:{autocomplete:"off"},model:{value:t.form.filterToSearchUsers,callback:function(e){t.$set(t.form,"filterToSearchUsers",e)},expression:"form.filterToSearchUsers"}})],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_USER_CLASS_IDENTIFIER")}},[e("b-input-group",{scopedSlots:t._u([{key:"append",fn:function(){return[e("b-input-group-text",{staticClass:"p-0"},[e("b-button",{staticClass:"border-0",attrs:{size:"md",variant:"outline-light"},on:{click:function(e){t.disabledField.userClassIdentifier=!t.disabledField.userClassIdentifier}}},[e("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"primary"}})],1)],1)]},proxy:!0}])},[e("b-form-input",{attrs:{disabled:t.disabledField.userClassIdentifier,autocomplete:"off"},model:{value:t.form.userClassIdentifier,callback:function(e){t.$set(t.form,"userClassIdentifier",e)},expression:"form.userClassIdentifier"}})],1)],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_GROUP_CLASS_IDENTIFIER")}},[e("b-input-group",{scopedSlots:t._u([{key:"append",fn:function(){return[e("b-input-group-text",{staticClass:"p-0"},[e("b-button",{staticClass:"border-0",attrs:{size:"md",variant:"outline-light"},on:{click:function(e){t.disabledField.groupClassIdentifier=!t.disabledField.groupClassIdentifier}}},[e("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"primary"}})],1)],1)]},proxy:!0}])},[e("b-form-input",{attrs:{disabled:t.disabledField.groupClassIdentifier,autocomplete:"off"},model:{value:t.form.groupClassIdentifier,callback:function(e){t.$set(t.form,"groupClassIdentifier",e)},expression:"form.groupClassIdentifier"}})],1)],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_DEPARTMENT_CLASS_IDENTIFIER")}},[e("b-input-group",{scopedSlots:t._u([{key:"append",fn:function(){return[e("b-input-group-text",{staticClass:"p-0"},[e("b-button",{staticClass:"border-0",attrs:{size:"md",variant:"outline-light"},on:{click:function(e){t.disabledField.departmentClassIdentifier=!t.disabledField.departmentClassIdentifier}}},[e("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"primary"}})],1)],1)]},proxy:!0}])},[e("b-form-input",{attrs:{disabled:t.disabledField.departmentClassIdentifier,autocomplete:"off"},model:{value:t.form.departmentClassIdentifier,callback:function(e){t.$set(t.form,"departmentClassIdentifier",e)},expression:"form.departmentClassIdentifier"}})],1)],1)],1)],1),e("b-row",{staticClass:"text-right"},[e("b-col",[e("b-form-group",[e("b-button",{attrs:{variant:"danger"},on:{click:function(e){return t.$emit("cancel")}}},[t._v(t._s(t.$root.translation("ID_CANCEL")))]),t._v(" "),e("b-button",{attrs:{type:"submit",variant:"success"}},[t._v(t._s(t.buttonLabel))])],1)],1)],1)],1)],1),e("b-modal",{attrs:{id:"messageForFailedTest","ok-variant":"success","ok-only":""}},[t._v(" "+t._s(t.testMessage)+" ")]),e("b-modal",{ref:"fas-b-modal-upload-file",attrs:{title:t.$root.translation("ID_IMPORT_SETTINGS"),"hide-footer":"",size:"lg"}},[e("formUploadSource",{ref:"formUploadSource",attrs:{skipNameValidation:""},on:{cancel:function(e){t.$refs["fas-b-modal-upload-file"].hide(),t.$refs.formUploadSource.reset()},optionSaveButton:t.optionSaveButton}})],1)],1)},x=[],H={mixins:[R["validationMixin"]],components:{formUploadSource:O},validations(){let t={form:{name:{required:I["required"]},serverAddress:{required:I["required"]},port:{required:I["required"]}}};return"1"===this.form.anonymous&&(t.form.userName={},t.form.password={}),"0"===this.form.anonymous&&(t.form.userName={required:I["required"]},t.form.password={required:I["required"]}),t},data(){return{buttonLabel:this.$root.translation("ID_TEST"),testStatus:!1,testMessage:"",showMathAttributes:!1,form:{uid:"",availableAuthenticationSource:"ldapAdvanced",name:"",type:"ad",serverAddress:"",port:"389",enableAutomaticRegister:"0",anonymous:"0",enableTLS:"0",baseDN:"",userName:"",password:"",userIdentifier:"samaccountname",filterToSearchUsers:"",gridText:"[]",signInPolicyForLDAP:"1",inactiveUsers:"",role:"PROCESSMAKER_OPERATOR",groupIdentifier:"member",userClassIdentifier:"",groupClassIdentifier:"(objectclass=posixgroup)(objectclass=group)(objectclass=groupofuniquenames)",departmentClassIdentifier:"(objectclass=organizationalunit)"},availableAuthenticationSources:[{value:"ldapAdvanced",text:"LDAP Advanced"},{value:"ldap",text:"LDAP"}],types:[{value:"ad",text:"Active Directory"},{value:"ldap",text:"Open LDAP"},{value:"ds",text:"389 DS"}],roles:[],disabledField:{port:!0,userIdentifier:!0,groupIdentifier:!0,userClassIdentifier:!0,groupClassIdentifier:!0,departmentClassIdentifier:!0}}},methods:{validateState(t){const{$dirty:e,$error:o}=this.$v.form[t];return e?!o:null},reset(){this.form={uid:"",availableAuthenticationSource:"ldapAdvanced",name:"",type:"ad",serverAddress:"",port:"389",enableAutomaticRegister:"0",anonymous:"0",enableTLS:"0",baseDN:"",userName:"",password:"",userIdentifier:"samaccountname",filterToSearchUsers:"",gridText:"[]",signInPolicyForLDAP:"1",inactiveUsers:"",role:"PROCESSMAKER_OPERATOR",groupIdentifier:"member",userClassIdentifier:"",groupClassIdentifier:"(objectclass=posixgroup)(objectclass=group)(objectclass=groupofuniquenames)",departmentClassIdentifier:"(objectclass=organizationalunit)"}},onSave(){this.$v.form.$touch(),this.$v.form.$anyError||(this.testStatus?this.$emit("save",this.form):this.test(this.form))},load(t){this.form=t},test(t){let e=new FormData;e.append("AUTH_SOURCE_NAME",t.name),U.a.post(this.$root.baseUrl()+"authSources/authSourcesProxy.php?action=authSourcesVerifyName",e).then(e=>{if(!1===e.data.row||""!==this.form.uid&&"string"===typeof this.form.uid){let e=this.formToFormData(t);U.a.post(this.$root.baseUrl()+"authSources/authSourcesProxy?action=authSourcesTestConnection",e).then(t=>{if("OK"===t.data.status)return this.testStatus=!0,this.buttonLabel=this.$root.translation("ID_SAVE"),"message"in t.data&&this.$bvModal.msgBoxOk(t.data.message,{title:" ",hideHeaderClose:!1,okTitle:this.$root.translation("ID_OK"),okVariant:"success",okOnly:!0}),void this.$bvModal.msgBoxOk(this.$root.translation("ID_SUCCESSFUL_TEST_CONNECTION"),{title:" ",hideHeaderClose:!1,okTitle:this.$root.translation("ID_OK"),okVariant:"success",okOnly:!0});this.testMessage=t.data.message,this.testStatus=!1,this.buttonLabel=this.$root.translation("ID_TEST"),this.$bvModal.show("messageForFailedTest")}).catch(t=>{}).finally(()=>{})}else this.$bvModal.msgBoxOk(this.$root.translation("ID_NAME_EXISTS"),{title:" ",hideHeaderClose:!1,okTitle:this.$root.translation("ID_OK"),okVariant:"success",okOnly:!0}).then(t=>{}).catch(t=>{})}).catch(t=>{}).finally(()=>{})},matchAttributesToSync(){this.$emit("matchAttributesToSync")},setGridText(t){this.form.gridText=t},getGridText(){return this.form.gridText},optionSaveButton(t){this.$refs["fas-b-modal-upload-file"].hide(),t.AUTH_SOURCE_UID=this.form.uid;let e=this.rowToForm(t);this.load(e)},rowToForm(t){let e=[];if("AUTH_SOURCE_GRID_ATTRIBUTE"in t)for(let r in t.AUTH_SOURCE_GRID_ATTRIBUTE){let o=t.AUTH_SOURCE_GRID_ATTRIBUTE[r]||{};e.push({attributeRole:o.attributeRole||"",attributeUser:o.attributeUser||"",attributeLdap:o.attributeLdap||""})}var o={uid:t.AUTH_SOURCE_UID,availableAuthenticationSource:t.AUTH_SOURCE_PROVIDER,name:t.AUTH_SOURCE_NAME,type:t.LDAP_TYPE,serverAddress:t.AUTH_SOURCE_SERVER_NAME,port:t.AUTH_SOURCE_PORT,enableAutomaticRegister:t.AUTH_SOURCE_AUTO_REGISTER,anonymous:t.AUTH_ANONYMOUS,enableTLS:t.AUTH_SOURCE_ENABLED_TLS,baseDN:t.AUTH_SOURCE_BASE_DN,userName:t.AUTH_SOURCE_SEARCH_USER,password:t.AUTH_SOURCE_PASSWORD,userIdentifier:t.AUTH_SOURCE_IDENTIFIER_FOR_USER,filterToSearchUsers:t.AUTH_SOURCE_USERS_FILTER,gridText:JSON.stringify(e),signInPolicyForLDAP:t.AUTH_SOURCE_SIGNIN_POLICY_FOR_LDAP,inactiveUsers:t.AUTH_SOURCE_RETIRED_OU,role:t.USR_ROLE||"",groupIdentifier:t.AUTH_SOURCE_IDENTIFIER_FOR_USER_GROUP||"",userClassIdentifier:t.AUTH_SOURCE_IDENTIFIER_FOR_USER_CLASS||"",groupClassIdentifier:t.GROUP_CLASS_IDENTIFIER||"",departmentClassIdentifier:t.DEPARTMENT_CLASS_IDENTIFIER||""};return o},formToFormData(t){let e=new FormData;return e.append("AUTH_SOURCE_UID",t.uid),e.append("AUTH_SOURCE_NAME",t.name),e.append("AUTH_SOURCE_PROVIDER",t.availableAuthenticationSource),e.append("LDAP_TYPE",t.type),e.append("AUTH_SOURCE_AUTO_REGISTER",t.enableAutomaticRegister),e.append("AUTH_SOURCE_SERVER_NAME",t.serverAddress),e.append("AUTH_SOURCE_PORT",t.port),e.append("AUTH_SOURCE_ENABLED_TLS",t.enableTLS),e.append("AUTH_SOURCE_BASE_DN",t.baseDN),e.append("AUTH_ANONYMOUS",t.anonymous),e.append("AUTH_SOURCE_SEARCH_USER",t.userName),e.append("AUTH_SOURCE_PASSWORD",t.password),e.append("AUTH_SOURCE_IDENTIFIER_FOR_USER",t.userIdentifier),e.append("AUTH_SOURCE_USERS_FILTER",t.filterToSearchUsers),e.append("AUTH_SOURCE_RETIRED_OU",t.inactiveUsers),e.append("AUTH_SOURCE_ATTRIBUTE_IDS","USR_FIRSTNAME|USR_LASTNAME|USR_EMAIL|USR_DUE_DATE|USR_STATUS|USR_STATUS_ID|USR_ADDRESS|USR_PHONE|USR_FAX|USR_CELLULAR|USR_ZIP_CODE|USR_POSITION|USR_BIRTHDAY|USR_COST_BY_HOUR|USR_UNIT_COST|USR_PMDRIVE_FOLDER_UID|USR_BOOKMARK_START_CASES|USR_TIME_ZONE|USR_DEFAULT_LANG|USR_LAST_LOGIN|"),e.append("AUTH_SOURCE_SHOWGRID",""),e.append("AUTH_SOURCE_GRID_TEXT",t.gridText),e.append("AUTH_SOURCE_SHOWGRID-checkbox","on"),e.append("AUTH_SOURCE_SIGNIN_POLICY_FOR_LDAP",t.signInPolicyForLDAP),e.append("USR_ROLE",t.role),e.append("AUTH_SOURCE_IDENTIFIER_FOR_USER_GROUP",t.groupIdentifier),e.append("AUTH_SOURCE_IDENTIFIER_FOR_USER_CLASS",t.userClassIdentifier),e.append("GROUP_CLASS_IDENTIFIER",t.groupClassIdentifier),e.append("DEPARTMENT_CLASS_IDENTIFIER",t.departmentClassIdentifier),e.append("CUSTOM_CHECK_AUTH_SOURCE_IDENTIFIER_FOR_USER",0),e.append("CUSTOM_CHECK_AUTH_SOURCE_IDENTIFIER_FOR_USER_GROUP",0),e.append("CUSTOM_CHECK_DEPARTMENT_CLASS_IDENTIFIER",0),e.append("CUSTOM_CHECK_GROUP_CLASS_IDENTIFIER",0),e.append("CUSTOM_AUTH_SOURCE_IDENTIFIER_FOR_USER",""),e.append("CUSTOM_AUTH_SOURCE_IDENTIFIER_FOR_USER_GROUP",""),e.append("CUSTOM_DEPARTMENT_CLASS_IDENTIFIER",""),e.append("CUSTOM_GROUP_CLASS_IDENTIFIER",""),e},changeTypeForm(t){"ad"===t&&(this.form.userIdentifier="samaccountname",this.form.groupIdentifier="member",this.form.signInPolicyForLDAP="1"),"ldap"===t&&(this.form.userIdentifier="uid",this.form.groupIdentifier="memberuid",this.form.signInPolicyForLDAP="0"),"ds"===t&&(this.form.userIdentifier="uid",this.form.groupIdentifier="uniquemember",this.form.signInPolicyForLDAP="0")},getRolesList(){let t=new FormData;return t.append("action","rolesList"),U.a.post(this.$root.baseUrl()+"users/usersAjax",t).then(t=>{let e=[];for(let o in t.data)e.push({value:t.data[o].ROL_UID,text:t.data[o].ROL_CODE});this.roles=e}).catch(t=>{}).finally(()=>{})}},watch:{form:{handler(){this.testStatus=!1,this.buttonLabel=this.$root.translation("ID_TEST"),this.showMathAttributes=!(""===this.form.uid)},deep:!0}},mounted(){this.$nextTick((function(){this.getRolesList()}))}},F=H,P=Object(b["a"])(F,y,x,!1,null,"9a7f3924",null),M=P.exports,k={data(){return{title:"#"}},components:{titleSection:m,formAuthenticationSources:M},methods:{setTitle(t){this.title=t},reset(){this.$refs.formAuthenticationSources.reset()},load(t){this.$refs.formAuthenticationSources.load(t)},cancel(){this.reset(),this.$emit("cancel")},rowToForm(t){return this.$refs.formAuthenticationSources.rowToForm(t)},formToFormData(t){return this.$refs.formAuthenticationSources.formToFormData(t)},setGridText(t){this.$refs.formAuthenticationSources.setGridText(t)},getGridText(){return this.$refs.formAuthenticationSources.getGridText()}}},B=k,G=Object(b["a"])(B,$,L,!1,null,"7473988f",null),V=G.exports,j=function(){var t=this,e=t._self._c;return e("div",[e("titleSection",{attrs:{title:t.$root.translation("ID_MATCH_ATTRIBUTES")}}),e("b-form-group",{staticClass:"text-right"},[e("b-link",{attrs:{href:"#"},on:{click:t.connectionSettings}},[t._v(" << "+t._s(t.$root.translation("ID_CONNECTION_SETTINGS")))])],1),e("b-form-group",{staticClass:"float-right"},[e("b-button",{attrs:{variant:"success"},on:{click:t.addAttribute}},[t._v(t._s(t.$root.translation("ID_ADD_ATTRIBUTE")))])],1),e("v-client-table",{attrs:{columns:t.columns,options:t.options,data:t.rows},scopedSlots:t._u([{key:"icons",fn:function(o){return e("div",{},[e("b-button-group",[e("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:t.$root.translation("ID_EDIT_ATTRIBUTE"),variant:"light"},on:{click:function(e){return t.editAttribute(o.row,o.index)}}},[e("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"info"}})],1),e("b-button",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{title:t.$root.translation("ID_DELETE_ATTRIBUTE"),variant:"light"},on:{click:function(e){return t.deleteAttribute(o.index,o.row)}}},[e("b-icon",{attrs:{icon:"trash","aria-hidden":"true",variant:"danger"}})],1)],1)],1)}}])}),e("b-modal",{attrs:{id:"messageForDeleteAttribute","ok-title":t.$root.translation("ID_YES"),"ok-variant":"success","cancel-title":t.$root.translation("ID_NO"),"cancel-variant":"danger"},on:{ok:t.deleteAttributeProcess}},[t._v(" "+t._s(t.$root.translation("ID_ARE_YOU_SURE_TO_DELETE_ATTRIBUTE_PLEASE_CONFIRM",[t.selectedRowName]))+" ")])],1)},q=[],Y={components:{titleSection:m},data(){return{selectedRowIndex:0,selectedRowName:"",columns:["attributeRole","attributeUser","attributeLdap","icons"],options:{headings:{attributeRole:this.$root.translation("ID_ROLE"),attributeUser:this.$root.translation("ID_USER_FIELD"),attributeLdap:this.$root.translation("ID_LDAP_FIELD"),icons:""},sortable:["attributeLdap","attributeRole","attributeUser"],filterable:["attributeLdap","attributeRole","attributeUser"],texts:{filter:"",filterPlaceholder:this.$root.translation("ID_EMPTY_SEARCH"),count:this.$root.translation("ID_SHOWING_FROM_RECORDS_COUNT"),noResults:this.$root.translation("ID_NO_MATCHING_RECORDS"),loading:this.$root.translation("ID_LOADING_GRID")},perPage:5,perPageValues:[],sortIcon:{is:"glyphicon-sort",base:"glyphicon",up:"glyphicon-chevron-up",down:"glyphicon-chevron-down"}},rows:[]}},methods:{setRows(t){this.rows=t},addAttribute(){this.$emit("addAttribute")},editAttribute(t,e){this.$emit("editAttribute",t,e)},deleteAttribute(t,e){this.selectedRowName=e.attributeLdap,this.selectedRowIndex=t,this.$bvModal.show("messageForDeleteAttribute")},deleteAttributeProcess(){this.rows.splice(this.selectedRowIndex-1,1)},saveRow(t){let e=Object.assign({},t);if(null===e.index)delete e.index,this.rows.push(e);else{let t=e.index;delete e.index,Object.assign(this.rows[t-1],e)}},connectionSettings(){this.$emit("connectionSettings",this.rows)}}},z=Y,W=Object(b["a"])(z,j,q,!1,null,"179fc62b",null),K=W.exports,J=function(){var t=this,e=t._self._c;return e("div",[e("titleSection",{attrs:{title:t.$root.translation("ID_NEW_MATCHED_ATTRIBUTE")}}),e("b-form",{on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.onSave.apply(null,arguments)}}},[e("b-container",{attrs:{fluid:""}},[e("b-row",[e("b-col",[e("b-form-group",{attrs:{label:t.$root.translation("ID_ROLE")}},[e("b-form-select",{attrs:{options:t.roles},on:{change:t.changeRoles},model:{value:t.form.attributeRole,callback:function(e){t.$set(t.form,"attributeRole",e)},expression:"form.attributeRole"}})],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_PROCESSMAKER_USER_FIELD"),description:""}},[e("b-form-select",{attrs:{options:t.userAttributes},model:{value:t.form.attributeUser,callback:function(e){t.$set(t.form,"attributeUser",e)},expression:"form.attributeUser"}})],1),e("b-form-group",{attrs:{label:t.$root.translation("ID_LDAP_ATTRIBUTE")}},[e("b-form-input",{attrs:{state:!0,autocomplete:"off"},model:{value:t.form.attributeLdap,callback:function(e){t.$set(t.form,"attributeLdap",e)},expression:"form.attributeLdap"}}),e("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1)],1)],1),e("b-row",{staticClass:"text-right"},[e("b-col",[e("b-form-group",[e("b-button",{attrs:{variant:"danger"},on:{click:function(e){return t.$emit("cancel")}}},[t._v(t._s(t.$root.translation("ID_CANCEL")))]),t._v(" "),e("b-button",{attrs:{type:"submit",variant:"success"}},[t._v(t._s(t.$root.translation("ID_SAVE")))])],1)],1)],1)],1)],1)],1)},Q=[],Z={mixins:[R["validationMixin"]],components:{titleSection:m},validations:{form:{attributeLdap:{required:I["required"]}}},data(){return{form:{index:null,attributeLdap:"",attributeRole:"",attributeUser:""},roles:[{value:"",text:"All"}],userAttributes:[]}},mounted(){let t=this.getRolesList();t.then(t=>{this.changeRoles()})},methods:{validateState(t){const{$dirty:e,$error:o}=this.$v.form[t];return e?!o:null},onSave(){this.$v.form.$touch(),this.$v.form.$anyError||this.$emit("save",this.form)},load(t,e){this.form.index=e,this.form.attributeLdap=t.attributeLdap,this.form.attributeRole=t.attributeRole,this.form.attributeUser=t.attributeUser},reset(){this.form={index:null,attributeLdap:"",attributeRole:"",attributeUser:""}},changeRoles(){let t=new FormData;return t.append("option","listByRol"),t.append("rolCode",this.form.attributeRole),U.a.post(this.$root.baseUrl()+"userExtendedAttributes/index",t).then(t=>{let e=[{value:"",text:this.$root.translation("ID_SELECTED_FIELD")}];for(let o in t.data.data)e.push({value:t.data.data[o].value,text:t.data.data[o].text});this.userAttributes=e}).catch(t=>{}).finally(()=>{})},getRolesList(){let t=new FormData;return t.append("request","allRoles"),U.a.post(this.$root.baseUrl()+"roles/roles_Ajax",t).then(t=>{let e=[{value:"",text:this.$root.translation("ID_ALL")}];for(let o in t.data)e.push({value:t.data[o].ROL_CODE,text:t.data[o].ROL_NAME});this.roles=e}).catch(t=>{}).finally(()=>{})}}},X=Z,tt=Object(b["a"])(X,J,Q,!1,null,"6d14953e",null),et=tt.exports,ot={name:"app",components:{authenticationSources:N,newConnection:V,matchAttributes:K,newMatchedAttribute:et},data(){return{views:{authenticationSources:!0,newConnection:!1,matchAttributes:!1,newMatchedAttribute:!1},selectedRow:null}},methods:{showView(t){for(let e in this.views)this.views[e]=!1;this.views[t]=!0},newConnection(){this.$refs.newConnection.reset(),this.$refs.newConnection.setTitle(this.$root.translation("ID_NEW_AUTHENTICATION_SOURCES")),this.showView("newConnection")},editSettings(t){this.selectedRow=t;let e=this.$refs.newConnection.rowToForm(t);this.$refs.newConnection.setTitle(this.$root.translation("ID_EDIT_AUTHENTICATION_SOURCES")),this.$refs.newConnection.reset(),this.$refs.newConnection.load(e),this.showView("newConnection")},optionSaveButton(t){t.AUTH_SOURCE_UID="";let e=this.$refs.newConnection.rowToForm(t);this.$refs.newConnection.setTitle(this.$root.translation("ID_NEW_AUTHENTICATION_SOURCES")),this.$refs.newConnection.reset(),this.$refs.newConnection.load(e),this.showView("newConnection")},optionUpdateButton(t,e){t.AUTH_SOURCE_UID=e.AUTH_SOURCE_UID,this.selectedRow=t;let o=this.$refs.newConnection.rowToForm(t);this.$refs.newConnection.setTitle(this.$root.translation("ID_EDIT_AUTHENTICATION_SOURCES")),this.$refs.newConnection.reset(),this.$refs.newConnection.load(o),this.showView("newConnection")},optionNewButton(t){t.AUTH_SOURCE_UID="";let e=this.$refs.newConnection.rowToForm(t);this.$refs.newConnection.setTitle(this.$root.translation("ID_NEW_AUTHENTICATION_SOURCES")),this.$refs.newConnection.reset(),this.$refs.newConnection.load(e),this.showView("newConnection")},saveNewConnection(t){let e=this.$refs.newConnection.formToFormData(t);U.a.post(this.$root.baseUrl()+"authSources/authSourcesProxy?action=authSourcesSave",e).then(t=>{this.$refs.authenticationSources.refresh()}).catch(t=>{}).finally(()=>{}),this.showView("authenticationSources")},matchAttributesToSync(){let t=this.$refs.newConnection.getGridText(),e=JSON.parse(t);this.showView("matchAttributes"),this.$refs.matchAttributes.setRows(e)},addAttribute(){this.$refs.newMatchedAttribute.reset(),this.showView("newMatchedAttribute")},editAttribute(t,e){this.$refs.newMatchedAttribute.load(t,e),this.showView("newMatchedAttribute")},saveNewMatchedAttribute(t){this.$refs.matchAttributes.saveRow(t),this.showView("matchAttributes")},cancelNewMatchedAttribute(){this.showView("matchAttributes")},connectionSettings(t){let e=JSON.stringify(t);this.$refs.newConnection.setGridText(e),this.showView("newConnection")}}},rt=ot,it=(o("bb66"),Object(b["a"])(rt,s,l,!1,null,null,null)),at=it.exports;r["default"].config.productionTip=!1,r["default"].use(i["a"]),r["default"].use(a["a"]),r["default"].use(n["ClientTable"],{},!1,"bootstrap4",{}),r["default"].use(n["ServerTable"],{},!1,"bootstrap4",{}),new r["default"]({render:t=>t(at),methods:{translation(t,e){if("TRANSLATIONS"in window&&t in window.TRANSLATIONS&&(t=window.TRANSLATIONS[t],void 0!=e&&"length"in e))for(let o=0;o<e.length;o++)t=t.replace("{"+o+"}",e[o]);return t},baseUrl(){return"../"}}}).$mount("#app")},bb66:function(t,e,o){"use strict";o("c078")},c078:function(t,e,o){}});
|
||
//# sourceMappingURL=app.4050fbb5.js.map
|