TASK-207 Merge for ldap and ldapAdvanced

This commit is contained in:
Brayan Pereyra
2025-09-12 16:21:53 +00:00
parent 9cb66f4a4e
commit ea87d8aac6
20 changed files with 1011 additions and 121 deletions

View File

@@ -102,16 +102,17 @@
saveNewConnection(form) {
let formData = this.$refs.newConnection.formToFormData(form);
axios.post(this.$root.baseUrl() + "authSources/ldapAdvancedProxy.php?functionAccion=ldapSave", formData)
.then(response => {
response;
this.$refs.authenticationSources.refresh();
})
.catch(error => {
error;
})
.finally(() => {
});
//axios.post(this.$root.baseUrl() + "authSources/ldapAdvancedProxy.php?functionAccion=ldapSave", formData)
axios.post(this.$root.baseUrl() + "authSources/authSourcesProxy?action=authSourcesSave", formData)
.then(response => {
response;
this.$refs.authenticationSources.refresh();
})
.catch(error => {
error;
})
.finally(() => {
});
this.showView('authenticationSources');
},

View File

@@ -98,7 +98,8 @@
},
data() {
return {
baseUrl: this.$root.baseUrl() + "authSources/authSources_Ajax?action=authSourcesList",
//baseUrl: this.$root.baseUrl() + "authSources/authSources_Ajax?action=authSourcesList",
baseUrl: this.$root.baseUrl() + "authSources/authSourcesProxy?action=authSourcesList",
columns: [
"AUTH_SOURCE_NAME",
"AUTH_SOURCE_PROVIDER",
@@ -193,9 +194,11 @@
return;
}
let formData = new FormData();
formData.append("action", "deleteAuthSource");
//formData.append("action", "deleteAuthSource");
formData.append("action", "authSourcesDelete");
formData.append("auth_uid", row.AUTH_SOURCE_UID);
axios.post(this.$root.baseUrl() + "authSources/authSources_Ajax", formData)
//axios.post(this.$root.baseUrl() + "authSources/authSources_Ajax", formData)
axios.post(this.$root.baseUrl() + "authSources/authSourcesProxy", formData)
.then(response => {
response;
this.refresh();

View File

@@ -4,8 +4,8 @@
<b-container fluid>
<b-row>
<b-col>
<b-form-group :label="$root.translation('ID_AVAILABLE_AUTHENTICATION_SOURCES')" description="">
<b-form-select v-model="form.availableAuthenticationSource"
<b-form-group v-show=false :label="$root.translation('ID_AVAILABLE_AUTHENTICATION_SOURCES')" description="">
<b-form-select v-show=false v-model="form.availableAuthenticationSource"
:options="availableAuthenticationSources"/>
</b-form-group>
<b-form-group :label="$root.translation('ID_NAME')">
@@ -380,12 +380,14 @@
test(form) {
let formDataForName = new FormData();
formDataForName.append("AUTH_SOURCE_NAME", form.name);
axios.post(this.$root.baseUrl() + "authSources/ldapAdvancedProxy.php?functionAccion=ldapVerifyName", formDataForName)
//axios.post(this.$root.baseUrl() + "authSources/ldapAdvancedProxy.php?functionAccion=ldapVerifyName", formDataForName)
axios.post(this.$root.baseUrl() + "authSources/authSourcesProxy.php?action=authSourcesVerifyName", formDataForName)
.then(response => {
//the name is valid
if (response.data.row === false || (this.form.uid !== "" && typeof this.form.uid === "string")) {
let formData = this.formToFormData(form);
axios.post(this.$root.baseUrl() + "authSources/ldapAdvancedProxy.php?functionAccion=ldapTestConnection", formData)
//axios.post(this.$root.baseUrl() + "authSources/ldapAdvancedProxy.php?functionAccion=ldapTestConnection", formData)
axios.post(this.$root.baseUrl() + "authSources/authSourcesProxy?action=authSourcesTestConnection", formData)
.then(response => {
//test is successful
if (response.data.status === "OK") {

View File

@@ -141,7 +141,8 @@
//validation name
let formData = new FormData();
formData.append("AUTH_SOURCE_NAME", this.fileContent.AUTH_SOURCE_NAME);
axios.post(this.$root.baseUrl() + "authSources/ldapAdvancedProxy.php?functionAccion=ldapVerifyName", formData)
//axios.post(this.$root.baseUrl() + "authSources/ldapAdvancedProxy.php?functionAccion=ldapVerifyName", formData)
axios.post(this.$root.baseUrl() + "authSources/authSourcesProxy.php?action=authSourcesVerifyName", formData)
.then(response => {
this.newName = response.data.row === false;
this.validationResult = response.data;