2 lines
44 KiB
JavaScript
2 lines
44 KiB
JavaScript
(function(t){function e(e){for(var n,a,s=e[0],l=e[1],u=e[2],d=0,f=[];d<s.length;d++)a=s[d],Object.prototype.hasOwnProperty.call(r,a)&&r[a]&&f.push(r[a][0]),r[a]=0;for(n in l)Object.prototype.hasOwnProperty.call(l,n)&&(t[n]=l[n]);c&&c(e);while(f.length)f.shift()();return i.push.apply(i,u||[]),o()}function o(){for(var t,e=0;e<i.length;e++){for(var o=i[e],n=!0,s=1;s<o.length;s++){var l=o[s];0!==r[l]&&(n=!1)}n&&(i.splice(e--,1),t=a(a.s=o[0]))}return t}var n={},r={app:0},i=[];function a(e){if(n[e])return n[e].exports;var o=n[e]={i:e,l:!1,exports:{}};return t[e].call(o.exports,o,o.exports,a),o.l=!0,o.exports}a.m=t,a.c=n,a.d=function(t,e,o){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},a.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(a.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)a.d(o,n,function(e){return t[e]}.bind(null,n));return o},a.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.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;i.push([0,"chunk-vendors"]),o()})({0:function(t,e,o){t.exports=o("56d7")},"034f":function(t,e,o){"use strict";o("85ec")},"56d7":function(t,e,o){"use strict";o.r(e);o("ac1f"),o("5319"),o("e260"),o("e6cf"),o("cca6"),o("a79d");var n=o("2b0e"),r=o("5f5b"),i=o("b1e0"),a=(o("f9e3"),o("2dd8"),o("9ebe")),s=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"app"}},[o("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}}),o("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")}}}),o("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}}),o("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=(o("d3b7"),function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("titleSection",{attrs:{title:t.$root.translation("ID_AUTH_SOURCES")}}),o("b-form-group",{staticClass:"float-right"},[o("b-button",{attrs:{variant:"primary"},on:{click:function(e){return t.$refs["as-b-modal-upload-file"].show()}}},[o("b-icon",{attrs:{icon:"arrow-up-short","aria-hidden":"true"}}),t._v(" "+t._s(t.$root.translation("ID_IMPORT_CONNECTION"))+" ")],1),t._v(" "),o("b-button",{attrs:{variant:"success"},on:{click:function(e){return t.$emit("newConnection")}}},[o("b-icon",{attrs:{icon:"plus","aria-hidden":"true"}}),t._v(" "+t._s(t.$root.translation("ID_NEW_CONNECTION"))+" ")],1)],1),o("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(e){return o("div",{},[o("b-button",{staticClass:"mb-2",attrs:{id:"as-b-button-tooltip-"+e.index,variant:"light",size:"sm"},on:{mousedown:function(o){t.$root.$emit("bv::hide::tooltip"),t.$root.$emit("bv::show::tooltip","as-b-button-tooltip-"+e.index)},mouseup:function(o){t.$root.$emit("bv::hide::tooltip"),t.$root.$emit("bv::show::tooltip","as-b-button-tooltip-"+e.index)}}},[o("b-icon",{attrs:{icon:"three-dots-vertical","aria-hidden":"true"}})],1),o("b-tooltip",{attrs:{target:"as-b-button-tooltip-"+e.index,triggers:"hover","custom-class":"custom-tooltip",placement:"left",variant:"light","no-fade":""}},[o("b-button-group",[o("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(o){return t.importUsers(e.row)}}},[o("b-icon",{attrs:{icon:"arrow-repeat","aria-hidden":"true",variant:"success"}})],1),o("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(o){return t.downloadRow(e.row)}}},[o("b-icon",{attrs:{icon:"arrow-down","aria-hidden":"true",variant:"info"}})],1),o("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(o){return t.syncGroups(e.row)}}},[o("b-icon",{attrs:{icon:"people-fill","aria-hidden":"true",variant:"warning"}})],1),o("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(o){return t.syncDepartments(e.row)}}},[o("b-icon",{attrs:{icon:"diagram3-fill","aria-hidden":"true",variant:"warning"}})],1),o("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(o){return t.$emit("editSettings",e.row)}}},[o("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"info"}})],1),o("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(o){return t.deleteRow(e.row)}}},[o("b-icon",{attrs:{icon:"trash","aria-hidden":"true",variant:"danger"}})],1)],1)],1)],1)}}])}),o("b-modal",{ref:"as-b-modal-upload-file",attrs:{title:t.$root.translation("ID_UPLOAD_CONNECTION_SETTINGS"),"hide-footer":"",size:"lg"}},[o("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("3ca3"),o("ddb0"),o("2b3d"),function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("h3",{staticClass:"text-primary"},[t._v(" "+t._s(t.title)+" ")])])}),f=[],_={props:{title:String}},p=_,b=o("2877"),m=Object(b["a"])(p,d,f,!1,null,"4605384b",null),h=m.exports,S=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("b-form",{on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.onSave(e)}}},[o("b-container",{attrs:{fluid:""}},[o("b-row",[o("b-col",[1==t.newName?o("b-form-group",{attrs:{label:t.$root.translation("ID_PLEASE_ADD_THE_FILE_SETTINGS_TO_BE_UPLOADED")}},[o("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"}}),o("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1):o("b-form-group",{attrs:{label:t.$root.translation("ID_CONNECTION_WITH_THE_SAME_NAME_PLEASE_SELECT_AN_OPTION",[t.fileContent.AUTH_SOURCE_NAME])}},[o("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"}}),o("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1)],1)],1),o("b-row",{staticClass:"text-center"},[o("b-col",[1==t.newName?o("b-form-group",[o("b-button",{attrs:{variant:"danger"},on:{click:function(e){return t.$emit("cancel")}}},[t._v(t._s(t.$root.translation("ID_CANCEL")))]),t._v(" "),o("b-button",{attrs:{type:"submit",variant:"success",disabled:t.isDisabled,id:"save"}},[t._v(t._s(t.$root.translation("ID_SAVE")))])],1):o("b-form-group",[o("b-button",{attrs:{variant:"danger"},on:{click:function(e){return t.$emit("cancel")}}},[t._v(t._s(t.$root.translation("ID_CANCEL")))]),t._v(" "),o("b-button",{attrs:{type:"submit",variant:"primary",disabled:t.isDisabled,id:"update"}},[t._v(t._s(t.$root.translation("ID_UPDATE_SETTINGS")))]),t._v(" "),o("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),o("b-modal",{attrs:{id:"messageForInvalidFileExtension","ok-only":"",static:""}},[t._v(t._s(t.$root.translation("ID_PMG_SELECT_FILE")))]),o("b-modal",{attrs:{id:"messageForInvalidFileFormat","ok-only":"",static:""}},[t._v(t._s(t.$root.translation("ID_INVALID_DATA")))])],1)},E=[],R=(o("c975"),o("b0c0"),o("1dce")),I=o("b5ae"),T=o("bc3a"),A=o.n(T),v={mixins:[R["validationMixin"]],props:{skipNameValidation:Boolean},components:{},validations:{form:{connectionSettings:{required:I["required"]}}},data:function(){return{form:{connectionSettings:[]},fileContent:{},isDisabled:!0,validationResult:{},newName:!0}},methods:{validateState:function(t){var e=this.$v.form[t],o=e.$dirty,n=e.$error;return o?!n:null},onSave:function(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:function(){this.newName=!0,this.validationResult={},this.form.connectionSettings=[]},change:function(t){var e=this,o=t.target;if(!(o.files.length<=0)){var n=o.files[0];if(n.name.indexOf(".json")<0)return this.$bvModal.show("messageForInvalidFileExtension"),this.reset(),void(this.isDisabled=!0);var r=new FileReader;r.readAsText(n,"UTF-8"),r.onload=function(t){if(e.fileContent=JSON.parse(t.target.result),!("AUTH_SOURCE_NAME"in e.fileContent))return e.$bvModal.show("messageForInvalidFileFormat"),e.reset(),void(e.isDisabled=!0);if(!0!==e.skipNameValidation){var o=new FormData;o.append("AUTH_SOURCE_NAME",e.fileContent.AUTH_SOURCE_NAME),A.a.post(e.$root.baseUrl()+"authSources/ldapAdvancedProxy.php?functionAccion=ldapVerifyName",o).then((function(t){e.newName=!1===t.data.row,e.validationResult=t.data,e.isDisabled=!1})).catch((function(t){e.isDisabled=!0})).finally((function(){}))}else e.isDisabled=!1},r.onerror=function(){}}}}},U=v,C=Object(b["a"])(U,S,E,!1,null,"74202722",null),O=C.exports,D={components:{titleSection:h,formUploadSource:O},data:function(){return{baseUrl:this.$root.baseUrl()+"authSources/authSources_Ajax?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:function(t){return t.start=(t.page-1)*t.limit,A.a.get(this.url,{params:t},{}).catch((function(t){this.dispatch("error",t)}))},responseAdapter:function(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:function(){this.$refs.vServerTable1.refresh()},deleteRow:function(t){var e=this;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((function(o){if(!1!==o){var n=new FormData;n.append("action","deleteAuthSource"),n.append("auth_uid",t.AUTH_SOURCE_UID),A.a.post(e.$root.baseUrl()+"authSources/authSources_Ajax",n).then((function(t){e.refresh()})).catch((function(t){})).finally((function(){}))}})).catch((function(t){}))},downloadRow:function(t){this.$root.$emit("bv::hide::tooltip");var 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){var o=[];for(var n in e.AUTH_SOURCE_GRID_ATTRIBUTE){var r=e.AUTH_SOURCE_GRID_ATTRIBUTE[n]||{};o.push({attributeLdap:r.attributeLdap||"",attributeUser:r.attributeUser||"",attributeRole:r.attributeRole||""})}e.AUTH_SOURCE_GRID_ATTRIBUTE=o}var i=e.AUTH_SOURCE_NAME+".json";if(window.navigator.msSaveBlob)window.navigator.msSaveBlob(new Blob([JSON.stringify(e)],{type:"application/octet-stream"}),i);else{var a=document.createElement("a");document.body.appendChild(a),a.href=window.URL.createObjectURL(new Blob([JSON.stringify(e)],{type:"application/octet-stream"})),a.download=i,a.click(),document.body.removeChild(a)}},importUsers:function(t){location.href=this.$root.baseUrl()+"authSources/authSources_SearchUsers?sUID="+t.AUTH_SOURCE_UID},syncGroups:function(t){location.href=this.$root.baseUrl()+"authSources/authSourcesSynchronize?authUid="+t.AUTH_SOURCE_UID+"&tab=synchronizeGroups"},syncDepartments:function(t){location.href=this.$root.baseUrl()+"authSources/authSourcesSynchronize?authUid="+t.AUTH_SOURCE_UID+"&tab=synchronizeDepartments"},optionSaveButton:function(t){this.$refs["as-b-modal-upload-file"].hide(),this.$emit("optionSaveButton",t)},optionUpdateButton:function(t,e){this.$refs["as-b-modal-upload-file"].hide(),this.$emit("optionUpdateButton",t,e)},optionNewButton:function(t){this.$refs["as-b-modal-upload-file"].hide(),this.$emit("optionNewButton",t)}}},g=D,w=Object(b["a"])(g,u,c,!1,null,"1fd7bf5f",null),$=w.exports,N=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("titleSection",{attrs:{title:t.title}}),o("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.$createElement,o=t._self._c||e;return o("div",[o("b-form",{on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.onSave(e)}}},[o("b-container",{attrs:{fluid:""}},[o("b-row",[o("b-col",[o("b-form-group",{attrs:{label:t.$root.translation("ID_AVAILABLE_AUTHENTICATION_SOURCES"),description:""}},[o("b-form-select",{attrs:{options:t.availableAuthenticationSources},model:{value:t.form.availableAuthenticationSource,callback:function(e){t.$set(t.form,"availableAuthenticationSource",e)},expression:"form.availableAuthenticationSource"}})],1),o("b-form-group",{attrs:{label:t.$root.translation("ID_NAME")}},[o("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"}}),o("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1),o("b-form-group",{attrs:{label:t.$root.translation("ID_TYPE")}},[o("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?o("b-form-group",{attrs:{label:t.$root.translation("ID_REQUIRE_SIGN_IN_POLICY_FOR_LDAP")}},[o("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(),o("b-form-group",{attrs:{label:t.$root.translation("ID_SERVER_ADDRESS")}},[o("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"}}),o("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1),o("b-form-group",{attrs:{label:t.$root.translation("ID_PORT")}},[o("b-input-group",{scopedSlots:t._u([{key:"append",fn:function(){return[o("b-input-group-text",{staticClass:"p-0"},[o("b-button",{staticClass:"border-0",attrs:{size:"md",variant:"outline-light"},on:{click:function(e){t.disabledField.port=!t.disabledField.port}}},[o("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"primary"}})],1)],1)]},proxy:!0}])},[o("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"}}),o("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1)],1),o("b-form-group",{attrs:{label:t.$root.translation("ID_ENABLE_AUTOMATIC_REGISTER"),"label-cols-lg":"8"}},[o("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),o("b-form-group",{attrs:{label:t.$root.translation("ID_ANONYMOUS"),"label-cols-lg":"8"}},[o("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),o("b-form-group",{attrs:{label:t.$root.translation("ID_ENABLED_TLS"),"label-cols-lg":"8"}},[o("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),o("b-form-group",{attrs:{label:t.$root.translation("ID_BASE_DN")}},[o("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),o("b-form-group",{attrs:{label:t.$root.translation("ID_INACTIVE_USERS")}},[o("b-form-input",{attrs:{autocomplete:"off"},model:{value:t.form.inactiveUsers,callback:function(e){t.$set(t.form,"inactiveUsers",e)},expression:"form.inactiveUsers"}})],1),o("b-form-group",{attrs:{label:t.$root.translation("ID_ROLE")}},[o("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),o("b-col",[o("b-form-group",{staticClass:"text-right"},[o("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),o("b-form-group",{staticClass:"text-right"},[o("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),o("b-form-group",{attrs:{label:t.$root.translation("ID_USERNAME")}},[o("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"}}),o("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1),o("b-form-group",{attrs:{label:t.$root.translation("ID_PASSWORD")}},[o("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"}}),o("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1),o("b-form-group",{attrs:{label:t.$root.translation("ID_USER_IDENTIFIER")}},[o("b-input-group",{scopedSlots:t._u([{key:"append",fn:function(){return[o("b-input-group-text",{staticClass:"p-0"},[o("b-button",{staticClass:"border-0",attrs:{size:"md",variant:"outline-light"},on:{click:function(e){t.disabledField.userIdentifier=!t.disabledField.userIdentifier}}},[o("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"primary"}})],1)],1)]},proxy:!0}])},[o("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),o("b-form-group",{attrs:{label:t.$root.translation("ID_GROUP_IDENTIFIER")}},[o("b-input-group",{scopedSlots:t._u([{key:"append",fn:function(){return[o("b-input-group-text",{staticClass:"p-0"},[o("b-button",{staticClass:"border-0",attrs:{size:"md",variant:"outline-light"},on:{click:function(e){t.disabledField.groupIdentifier=!t.disabledField.groupIdentifier}}},[o("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"primary"}})],1)],1)]},proxy:!0}])},[o("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),o("b-form-group",{attrs:{label:t.$root.translation("ID_FILTER_TO_SEARCH_USERS")}},[o("b-form-input",{attrs:{autocomplete:"off"},model:{value:t.form.filterToSearchUsers,callback:function(e){t.$set(t.form,"filterToSearchUsers",e)},expression:"form.filterToSearchUsers"}})],1),o("b-form-group",{attrs:{label:t.$root.translation("ID_USER_CLASS_IDENTIFIER")}},[o("b-input-group",{scopedSlots:t._u([{key:"append",fn:function(){return[o("b-input-group-text",{staticClass:"p-0"},[o("b-button",{staticClass:"border-0",attrs:{size:"md",variant:"outline-light"},on:{click:function(e){t.disabledField.userClassIdentifier=!t.disabledField.userClassIdentifier}}},[o("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"primary"}})],1)],1)]},proxy:!0}])},[o("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),o("b-form-group",{attrs:{label:t.$root.translation("ID_GROUP_CLASS_IDENTIFIER")}},[o("b-input-group",{scopedSlots:t._u([{key:"append",fn:function(){return[o("b-input-group-text",{staticClass:"p-0"},[o("b-button",{staticClass:"border-0",attrs:{size:"md",variant:"outline-light"},on:{click:function(e){t.disabledField.groupClassIdentifier=!t.disabledField.groupClassIdentifier}}},[o("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"primary"}})],1)],1)]},proxy:!0}])},[o("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),o("b-form-group",{attrs:{label:t.$root.translation("ID_DEPARTMENT_CLASS_IDENTIFIER")}},[o("b-input-group",{scopedSlots:t._u([{key:"append",fn:function(){return[o("b-input-group-text",{staticClass:"p-0"},[o("b-button",{staticClass:"border-0",attrs:{size:"md",variant:"outline-light"},on:{click:function(e){t.disabledField.departmentClassIdentifier=!t.disabledField.departmentClassIdentifier}}},[o("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"primary"}})],1)],1)]},proxy:!0}])},[o("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),o("b-row",{staticClass:"text-right"},[o("b-col",[o("b-form-group",[o("b-button",{attrs:{variant:"danger"},on:{click:function(e){return t.$emit("cancel")}}},[t._v(t._s(t.$root.translation("ID_CANCEL")))]),t._v(" "),o("b-button",{attrs:{type:"submit",variant:"success"}},[t._v(t._s(t.buttonLabel))])],1)],1)],1)],1)],1),o("b-modal",{attrs:{id:"messageForFailedTest","ok-variant":"success","ok-only":""}},[t._v(" "+t._s(t.testMessage)+" ")]),o("b-modal",{ref:"fas-b-modal-upload-file",attrs:{title:t.$root.translation("ID_IMPORT_SETTINGS"),"hide-footer":"",size:"lg"}},[o("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:function(){var 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:function(){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:function(t){var e=this.$v.form[t],o=e.$dirty,n=e.$error;return o?!n:null},reset:function(){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:function(){this.$v.form.$touch(),this.$v.form.$anyError||(this.testStatus?this.$emit("save",this.form):this.test(this.form))},load:function(t){this.form=t},test:function(t){var e=this,o=new FormData;o.append("AUTH_SOURCE_NAME",t.name),A.a.post(this.$root.baseUrl()+"authSources/ldapAdvancedProxy.php?functionAccion=ldapVerifyName",o).then((function(o){if(!1===o.data.row||""!==e.form.uid&&"string"===typeof e.form.uid){var n=e.formToFormData(t);A.a.post(e.$root.baseUrl()+"authSources/ldapAdvancedProxy.php?functionAccion=ldapTestConnection",n).then((function(t){if("OK"===t.data.status)return e.testStatus=!0,e.buttonLabel=e.$root.translation("ID_SAVE"),"message"in t.data&&e.$bvModal.msgBoxOk(t.data.message,{title:" ",hideHeaderClose:!1,okTitle:e.$root.translation("ID_OK"),okVariant:"success",okOnly:!0}),void e.$bvModal.msgBoxOk(e.$root.translation("ID_SUCCESSFUL_TEST_CONNECTION"),{title:" ",hideHeaderClose:!1,okTitle:e.$root.translation("ID_OK"),okVariant:"success",okOnly:!0});e.testMessage=t.data.message,e.testStatus=!1,e.buttonLabel=e.$root.translation("ID_TEST"),e.$bvModal.show("messageForFailedTest")})).catch((function(t){})).finally((function(){}))}else e.$bvModal.msgBoxOk(e.$root.translation("ID_NAME_EXISTS"),{title:" ",hideHeaderClose:!1,okTitle:e.$root.translation("ID_OK"),okVariant:"success",okOnly:!0}).then((function(t){})).catch((function(t){}))})).catch((function(t){})).finally((function(){}))},matchAttributesToSync:function(){this.$emit("matchAttributesToSync")},setGridText:function(t){this.form.gridText=t},getGridText:function(){return this.form.gridText},optionSaveButton:function(t){this.$refs["fas-b-modal-upload-file"].hide(),t.AUTH_SOURCE_UID=this.form.uid;var e=this.rowToForm(t);this.load(e)},rowToForm:function(t){var e=[];if("AUTH_SOURCE_GRID_ATTRIBUTE"in t)for(var o in t.AUTH_SOURCE_GRID_ATTRIBUTE){var n=t.AUTH_SOURCE_GRID_ATTRIBUTE[o]||{};e.push({attributeRole:n.attributeRole||"",attributeUser:n.attributeUser||"",attributeLdap:n.attributeLdap||""})}var r={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 r},formToFormData:function(t){var 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:function(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:function(){var t=this,e=new FormData;return e.append("action","rolesList"),A.a.post(this.$root.baseUrl()+"users/usersAjax",e).then((function(e){var o=[];for(var n in e.data)o.push({value:e.data[n].ROL_UID,text:e.data[n].ROL_CODE});t.roles=o})).catch((function(t){})).finally((function(){}))}},watch:{form:{handler:function(){this.testStatus=!1,this.buttonLabel=this.$root.translation("ID_TEST"),this.showMathAttributes=!(""===this.form.uid)},deep:!0}},mounted:function(){this.$nextTick((function(){this.getRolesList()}))}},F=H,P=Object(b["a"])(F,y,x,!1,null,"c4fd4fc8",null),M=P.exports,k={data:function(){return{title:"#"}},components:{titleSection:h,formAuthenticationSources:M},methods:{setTitle:function(t){this.title=t},reset:function(){this.$refs.formAuthenticationSources.reset()},load:function(t){this.$refs.formAuthenticationSources.load(t)},cancel:function(){this.reset(),this.$emit("cancel")},rowToForm:function(t){return this.$refs.formAuthenticationSources.rowToForm(t)},formToFormData:function(t){return this.$refs.formAuthenticationSources.formToFormData(t)},setGridText:function(t){this.$refs.formAuthenticationSources.setGridText(t)},getGridText:function(){return this.$refs.formAuthenticationSources.getGridText()}}},B=k,G=Object(b["a"])(B,N,L,!1,null,"7473988f",null),V=G.exports,j=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("titleSection",{attrs:{title:t.$root.translation("ID_MATCH_ATTRIBUTES")}}),o("b-form-group",{staticClass:"text-right"},[o("b-link",{attrs:{href:"#"},on:{click:t.connectionSettings}},[t._v(" << "+t._s(t.$root.translation("ID_CONNECTION_SETTINGS")))])],1),o("b-form-group",{staticClass:"float-right"},[o("b-button",{attrs:{variant:"success"},on:{click:t.addAttribute}},[t._v(t._s(t.$root.translation("ID_ADD_ATTRIBUTE")))])],1),o("v-client-table",{attrs:{columns:t.columns,options:t.options,data:t.rows},scopedSlots:t._u([{key:"icons",fn:function(e){return o("div",{},[o("b-button-group",[o("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(o){return t.editAttribute(e.row,e.index)}}},[o("b-icon",{attrs:{icon:"pencil-fill","aria-hidden":"true",variant:"info"}})],1),o("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(o){return t.deleteAttribute(e.index,e.row)}}},[o("b-icon",{attrs:{icon:"trash","aria-hidden":"true",variant:"danger"}})],1)],1)],1)}}])}),o("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=(o("a434"),{components:{titleSection:h},data:function(){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:function(t){this.rows=t},addAttribute:function(){this.$emit("addAttribute")},editAttribute:function(t,e){this.$emit("editAttribute",t,e)},deleteAttribute:function(t,e){this.selectedRowName=e.attributeLdap,this.selectedRowIndex=t,this.$bvModal.show("messageForDeleteAttribute")},deleteAttributeProcess:function(){this.rows.splice(this.selectedRowIndex-1,1)},saveRow:function(t){var e=Object.assign({},t);if(null===e.index)delete e.index,this.rows.push(e);else{var o=e.index;delete e.index,Object.assign(this.rows[o-1],e)}},connectionSettings:function(){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.$createElement,o=t._self._c||e;return o("div",[o("titleSection",{attrs:{title:t.$root.translation("ID_NEW_MATCHED_ATTRIBUTE")}}),o("b-form",{on:{submit:function(e){return e.stopPropagation(),e.preventDefault(),t.onSave(e)}}},[o("b-container",{attrs:{fluid:""}},[o("b-row",[o("b-col",[o("b-form-group",{attrs:{label:t.$root.translation("ID_ROLE")}},[o("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),o("b-form-group",{attrs:{label:t.$root.translation("ID_PROCESSMAKER_USER_FIELD"),description:""}},[o("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),o("b-form-group",{attrs:{label:t.$root.translation("ID_LDAP_ATTRIBUTE")}},[o("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"}}),o("b-form-invalid-feedback",[t._v(t._s(t.$root.translation("ID_IS_REQUIRED")))])],1)],1)],1),o("b-row",{staticClass:"text-right"},[o("b-col",[o("b-form-group",[o("b-button",{attrs:{variant:"danger"},on:{click:function(e){return t.$emit("cancel")}}},[t._v(t._s(t.$root.translation("ID_CANCEL")))]),t._v(" "),o("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:h},validations:{form:{attributeLdap:{required:I["required"]}}},data:function(){return{form:{index:null,attributeLdap:"",attributeRole:"",attributeUser:""},roles:[{value:"",text:"All"}],userAttributes:[]}},mounted:function(){var t=this,e=this.getRolesList();e.then((function(e){t.changeRoles()}))},methods:{validateState:function(t){var e=this.$v.form[t],o=e.$dirty,n=e.$error;return o?!n:null},onSave:function(){this.$v.form.$touch(),this.$v.form.$anyError||this.$emit("save",this.form)},load:function(t,e){this.form.index=e,this.form.attributeLdap=t.attributeLdap,this.form.attributeRole=t.attributeRole,this.form.attributeUser=t.attributeUser},reset:function(){this.form={index:null,attributeLdap:"",attributeRole:"",attributeUser:""}},changeRoles:function(){var t=this,e=new FormData;return e.append("option","listByRol"),e.append("rolCode",this.form.attributeRole),A.a.post(this.$root.baseUrl()+"userExtendedAttributes/index",e).then((function(e){var o=[{value:"",text:t.$root.translation("ID_SELECTED_FIELD")}];for(var n in e.data.data)o.push({value:e.data.data[n].value,text:e.data.data[n].text});t.userAttributes=o})).catch((function(t){})).finally((function(){}))},getRolesList:function(){var t=this,e=new FormData;return e.append("request","allRoles"),A.a.post(this.$root.baseUrl()+"roles/roles_Ajax",e).then((function(e){var o=[{value:"",text:t.$root.translation("ID_ALL")}];for(var n in e.data)o.push({value:e.data[n].ROL_CODE,text:e.data[n].ROL_NAME});t.roles=o})).catch((function(t){})).finally((function(){}))}}},X=Z,tt=Object(b["a"])(X,J,Q,!1,null,"6d14953e",null),et=tt.exports,ot={name:"app",components:{authenticationSources:$,newConnection:V,matchAttributes:K,newMatchedAttribute:et},data:function(){return{views:{authenticationSources:!0,newConnection:!1,matchAttributes:!1,newMatchedAttribute:!1},selectedRow:null}},methods:{showView:function(t){for(var e in this.views)this.views[e]=!1;this.views[t]=!0},newConnection:function(){this.$refs.newConnection.reset(),this.$refs.newConnection.setTitle(this.$root.translation("ID_NEW_AUTHENTICATION_SOURCES")),this.showView("newConnection")},editSettings:function(t){this.selectedRow=t;var 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:function(t){t.AUTH_SOURCE_UID="";var 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:function(t,e){t.AUTH_SOURCE_UID=e.AUTH_SOURCE_UID,this.selectedRow=t;var 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:function(t){t.AUTH_SOURCE_UID="";var 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:function(t){var e=this,o=this.$refs.newConnection.formToFormData(t);A.a.post(this.$root.baseUrl()+"authSources/ldapAdvancedProxy.php?functionAccion=ldapSave",o).then((function(t){e.$refs.authenticationSources.refresh()})).catch((function(t){})).finally((function(){})),this.showView("authenticationSources")},matchAttributesToSync:function(){var t=this.$refs.newConnection.getGridText(),e=JSON.parse(t);this.showView("matchAttributes"),this.$refs.matchAttributes.setRows(e)},addAttribute:function(){this.$refs.newMatchedAttribute.reset(),this.showView("newMatchedAttribute")},editAttribute:function(t,e){this.$refs.newMatchedAttribute.load(t,e),this.showView("newMatchedAttribute")},saveNewMatchedAttribute:function(t){this.$refs.matchAttributes.saveRow(t),this.showView("matchAttributes")},cancelNewMatchedAttribute:function(){this.showView("matchAttributes")},connectionSettings:function(t){var e=JSON.stringify(t);this.$refs.newConnection.setGridText(e),this.showView("newConnection")}}},nt=ot,rt=(o("034f"),Object(b["a"])(nt,s,l,!1,null,null,null)),it=rt.exports;n["default"].config.productionTip=!1,n["default"].use(r["a"]),n["default"].use(i["a"]),n["default"].use(a["ClientTable"],{},!1,"bootstrap4",{}),n["default"].use(a["ServerTable"],{},!1,"bootstrap4",{}),new n["default"]({render:function(t){return t(it)},methods:{translation:function(t,e){if("TRANSLATIONS"in window&&t in window.TRANSLATIONS&&(t=window.TRANSLATIONS[t],void 0!=e&&"length"in e))for(var o=0;o<e.length;o++)t=t.replace("{"+o+"}",e[o]);return t},baseUrl:function(){return"../"}}}).$mount("#app")},"85ec":function(t,e,o){}});
|
|
//# sourceMappingURL=app.d1165b72.js.map
|