BUG 10380 "Cuando se selecciona la opcion ldap advanced se..." SOLVED
- Improved validation - Improved in "Check PM requirements" * Available from version ProcessMaker-2.0.46
This commit is contained in:
@@ -55,7 +55,7 @@ if (is_array( $fields['AUTH_SOURCE_DATA'] )) {
|
||||
}
|
||||
$fields['AUTH_SOURCE_SHOWGRID_FLAG'] = 0;
|
||||
if (isset($fields['AUTH_SOURCE_DATA']['AUTH_SOURCE_SHOWGRID']) && $fields['AUTH_SOURCE_DATA']['AUTH_SOURCE_SHOWGRID'] == 'on') {
|
||||
$fields['AUTH_SOURCE_SHOWGRID_FLAG'] = 1;
|
||||
$fields["AUTH_SOURCE_SHOWGRID_FLAG"] = 1;
|
||||
}
|
||||
unset( $fields['AUTH_SOURCE_DATA'] );
|
||||
|
||||
@@ -84,19 +84,34 @@ if ($fields['AUTH_SOURCE_PROVIDER'] == 'ldap') {
|
||||
G::RenderPage( 'publish', 'extJs' );
|
||||
} else {
|
||||
if (file_exists( PATH_PLUGINS . $fields['AUTH_SOURCE_PROVIDER'] . PATH_SEP . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' )) {
|
||||
if (class_exists( $fields['AUTH_SOURCE_PROVIDER'] )) {
|
||||
// The attributes the users
|
||||
G::loadClass('pmFunctions');
|
||||
$data = executeQuery('DESCRIBE USERS');
|
||||
$fieldSet = array('USR_UID', 'USR_USERNAME', 'USR_PASSWORD', 'USR_EMAIL', 'USR_CREATE_DATE', 'USR_UPDATE_DATE', 'USR_COUNTRY', 'USR_CITY', 'USR_LOCATION', 'DEP_UID', 'USR_RESUME', 'USR_ROLE', 'USR_REPORTS_TO', 'USR_REPLACED_BY', 'USR_UX');
|
||||
$attributes = '';
|
||||
$pluginEnabled = 0;
|
||||
|
||||
if (file_exists(PATH_PLUGINS . $fields["AUTH_SOURCE_PROVIDER"] . ".php")) {
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginDetail = $pluginRegistry->getPluginDetails($fields["AUTH_SOURCE_PROVIDER"] . ".php");
|
||||
|
||||
if ($pluginDetail && $pluginDetail->enabled) {
|
||||
$pluginEnabled = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ($pluginEnabled == 1) {
|
||||
//The attributes the users
|
||||
G::LoadClass("pmFunctions");
|
||||
|
||||
$data = executeQuery("DESCRIBE USERS");
|
||||
$fieldSet = array("USR_UID", "USR_USERNAME", "USR_PASSWORD", "USR_EMAIL", "USR_CREATE_DATE", "USR_UPDATE_DATE", "USR_COUNTRY", "USR_CITY", "USR_LOCATION", "DEP_UID", "USR_RESUME", "USR_ROLE", "USR_REPORTS_TO", "USR_REPLACED_BY", "USR_UX");
|
||||
$attributes = null;
|
||||
|
||||
foreach ($data as $value) {
|
||||
if (!(in_array($value['Field'], $fieldSet))) {
|
||||
$attributes .= $value['Field'] . '|';
|
||||
if (!(in_array($value["Field"], $fieldSet))) {
|
||||
$attributes = $attributes . $value["Field"] . "|";
|
||||
}
|
||||
}
|
||||
$fields['AUTH_SOURCE_ATTRIBUTE_IDS'] = $attributes;
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', "../plugins/".$fields['AUTH_SOURCE_PROVIDER'] . PATH_SEP . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit', '', $fields, '../authSources/authSources_Save' );
|
||||
|
||||
$fields["AUTH_SOURCE_ATTRIBUTE_IDS"] = $attributes;
|
||||
|
||||
$G_PUBLISH->AddContent("xmlform", "xmlform", $fields["AUTH_SOURCE_PROVIDER"] . PATH_SEP . $fields["AUTH_SOURCE_PROVIDER"] . "Edit", "", $fields, "../authSources/authSources_Save");
|
||||
} else {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', array ('MESSAGE' => G::LoadTranslation( 'ID_AUTH_SOURCE_MISSING' )
|
||||
) );
|
||||
@@ -109,6 +124,7 @@ if ($fields['AUTH_SOURCE_PROVIDER'] == 'ldap') {
|
||||
) );
|
||||
}
|
||||
}
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
|
||||
G::RenderPage("publish", "blank");
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,34 @@ $fields = array ('AUTH_SOURCE_PROVIDER' => $_REQUEST['AUTH_SOURCE_PROVIDER']);
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
if (file_exists( PATH_PLUGINS . $fields['AUTH_SOURCE_PROVIDER'] . PATH_SEP . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' )) {
|
||||
if (class_exists( $fields['AUTH_SOURCE_PROVIDER'] )) {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', $fields['AUTH_SOURCE_PROVIDER'] . PATH_SEP . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml', '', $fields, '../authSources/authSources_Save' );
|
||||
$pluginEnabled = 0;
|
||||
|
||||
if (file_exists(PATH_PLUGINS . $fields["AUTH_SOURCE_PROVIDER"] . ".php")) {
|
||||
$pluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$pluginDetail = $pluginRegistry->getPluginDetails($fields["AUTH_SOURCE_PROVIDER"] . ".php");
|
||||
|
||||
if ($pluginDetail && $pluginDetail->enabled) {
|
||||
$pluginEnabled = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ($pluginEnabled == 1) {
|
||||
//The attributes the users
|
||||
G::LoadClass("pmFunctions");
|
||||
|
||||
$data = executeQuery("DESCRIBE USERS");
|
||||
$fieldSet = array("USR_UID", "USR_USERNAME", "USR_PASSWORD", "USR_EMAIL", "USR_CREATE_DATE", "USR_UPDATE_DATE", "USR_COUNTRY", "USR_CITY", "USR_LOCATION", "DEP_UID", "USR_RESUME", "USR_ROLE", "USR_REPORTS_TO", "USR_REPLACED_BY", "USR_UX");
|
||||
$attributes = null;
|
||||
|
||||
foreach ($data as $value) {
|
||||
if (!(in_array($value["Field"], $fieldSet))) {
|
||||
$attributes = $attributes . $value["Field"] . "|";
|
||||
}
|
||||
}
|
||||
|
||||
$fields["AUTH_SOURCE_ATTRIBUTE_IDS"] = $attributes;
|
||||
|
||||
$G_PUBLISH->AddContent("xmlform", "xmlform", $fields["AUTH_SOURCE_PROVIDER"] . PATH_SEP . $fields["AUTH_SOURCE_PROVIDER"] . "Edit", "", $fields, "../authSources/authSources_Save");
|
||||
} else {
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', array ('MESSAGE' => G::LoadTranslation( 'ID_AUTH_SOURCE_MISSING' )) );
|
||||
}
|
||||
@@ -51,4 +77,6 @@ if (file_exists( PATH_PLUGINS . $fields['AUTH_SOURCE_PROVIDER'] . PATH_SEP . $fi
|
||||
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'login/showMessage', '', array ('MESSAGE' => 'File: ' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' . ' not exists.') );
|
||||
}
|
||||
}
|
||||
G::RenderPage( 'publish', 'blank' );
|
||||
|
||||
G::RenderPage("publish", "blank");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user