PM-1060: Firt migration ldapAdvanced
This commit is contained in:
2963
workflow/engine/classes/class.ldapAdvanced.php
Executable file
2963
workflow/engine/classes/class.ldapAdvanced.php
Executable file
File diff suppressed because it is too large
Load Diff
@@ -158,17 +158,15 @@ try {
|
||||
if (($sObject != '.') && ($sObject != '..') && ($sObject != '.svn') && ($sObject != 'ldap')) {
|
||||
if (is_file( PATH_RBAC . 'plugins' . PATH_SEP . $sObject )) {
|
||||
$sType = trim(str_replace(array("class.", ".php"), "", $sObject));
|
||||
|
||||
$statusPlugin = $pluginRegistry->getStatusPlugin($sType);
|
||||
$flagAdd = false;
|
||||
|
||||
if (preg_match("/^(?:enabled|disabled)$/", $statusPlugin)) {
|
||||
if ($statusPlugin == "enabled") {
|
||||
$flagAdd = true;
|
||||
}
|
||||
} else {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures
|
||||
::getSingleton()
|
||||
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
|
||||
$flagAdd = true;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if ($flagAdd) {
|
||||
$arr[] = array("sType" => $sType, "sLabel" => $sType);
|
||||
|
||||
@@ -37,19 +37,8 @@ $G_ID_SUB_MENU_SELECTED = 'AUTH_SOURCES';
|
||||
$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' )) {
|
||||
$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 (file_exists( PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Edit.xml' )) {
|
||||
$pluginEnabled = 1;
|
||||
if ($pluginEnabled == 1) {
|
||||
//The attributes the users
|
||||
G::LoadClass("pmFunctions");
|
||||
@@ -64,17 +53,17 @@ if (file_exists( PATH_PLUGINS . $fields['AUTH_SOURCE_PROVIDER'] . PATH_SEP . $fi
|
||||
}
|
||||
}
|
||||
$fields["AUTH_SOURCE_ATTRIBUTE_IDS"] = $attributes;
|
||||
if (file_exists(PATH_PLUGINS . $fields["AUTH_SOURCE_PROVIDER"] . PATH_SEP . $fields["AUTH_SOURCE_PROVIDER"] . 'Flag')) {
|
||||
if (file_exists(PATH_XMLFORM . 'ldapAdvanced/' . $fields['AUTH_SOURCE_PROVIDER'] . 'Flag')) {
|
||||
$oHeadPublisher = & headPublisher::getSingleton ();
|
||||
|
||||
|
||||
$oHeadPublisher->assign("Fields", $fields);
|
||||
$oHeadPublisher->addExtJsScript (PATH_PLUGINS . $fields["AUTH_SOURCE_PROVIDER"] . PATH_SEP . 'js' . PATH_SEP . 'library', false, true );
|
||||
$oHeadPublisher->addExtJsScript (PATH_PLUGINS . $fields["AUTH_SOURCE_PROVIDER"] . PATH_SEP . 'js' . PATH_SEP . 'ldapAdvancedForm', false, true );
|
||||
$oHeadPublisher->addExtJsScript (PATH_PLUGINS . $fields["AUTH_SOURCE_PROVIDER"] . PATH_SEP . 'js' . PATH_SEP . 'ldapAdvancedList', false, true );
|
||||
$oHeadPublisher->addExtJsScript (PATH_TPL. 'ldapAdvanced/library.js', false, true );
|
||||
$oHeadPublisher->addExtJsScript (PATH_TPL. 'ldapAdvanced/ldapAdvancedForm', false, true );
|
||||
$oHeadPublisher->addExtJsScript (PATH_TPL. 'ldapAdvanced/ldapAdvancedList', false, true );
|
||||
G::RenderPage ('publish', 'extJs');
|
||||
die();
|
||||
}
|
||||
$G_PUBLISH->AddContent("xmlform", "xmlform", $fields["AUTH_SOURCE_PROVIDER"] . PATH_SEP . $fields["AUTH_SOURCE_PROVIDER"] . "Edit", "", $fields, "../authSources/authSources_Save");
|
||||
$G_PUBLISH->AddContent("xmlform", "xmlform", 'ldapAdvanced/' . $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' )) );
|
||||
}
|
||||
|
||||
651
workflow/engine/methods/services/ldapadvanced.php
Executable file
651
workflow/engine/methods/services/ldapadvanced.php
Executable file
File diff suppressed because it is too large
Load Diff
237
workflow/engine/templates/ldapAdvanced/ldapAdvancedForm.js
Executable file
237
workflow/engine/templates/ldapAdvanced/ldapAdvancedForm.js
Executable file
@@ -0,0 +1,237 @@
|
||||
var ldapFormAnonymousOnChange = function (combo, arrayObject)
|
||||
{
|
||||
var flagAnonymous = (combo.getValue() == "1")? true : false;
|
||||
|
||||
arrayObject["ldapFormSearchUser"].allowBlank = flagAnonymous;
|
||||
arrayObject["ldapFormPassword"].allowBlank = flagAnonymous;
|
||||
|
||||
arrayObject["ldapFormSearchUser"].setVisible(!flagAnonymous);
|
||||
arrayObject["ldapFormPassword"].setVisible(!flagAnonymous);
|
||||
};
|
||||
|
||||
var ldapFormId = new Ext.form.Hidden({
|
||||
name: 'AUTH_SOURCE_UID',
|
||||
id: 'AUTH_SOURCE_UID'
|
||||
});
|
||||
|
||||
var ldapFormName = new Ext.form.TextField({
|
||||
fieldLabel: '<span style="color: red">*</span>' + _('ID_NAME'),
|
||||
name: 'AUTH_SOURCE_NAME',
|
||||
id: 'AUTH_SOURCE_NAME',
|
||||
autoCreate: {tag: 'input', type: 'text', maxlength: '50'},
|
||||
allowBlank: false,
|
||||
width: 210
|
||||
});
|
||||
|
||||
var ldapFormProvider = new Ext.form.Hidden({
|
||||
name: 'AUTH_SOURCE_PROVIDER',
|
||||
id: 'AUTH_SOURCE_PROVIDER'
|
||||
});
|
||||
|
||||
var ldapFormType = new Ext.form.ComboBox({
|
||||
valueField: 'ID',
|
||||
displayField: 'VALUE',
|
||||
value: 'ldap',
|
||||
|
||||
fieldLabel: '<span style="color: red">*</span>' + _('ID_TYPE'),
|
||||
typeAhead: true,
|
||||
forceSelection: true,
|
||||
triggerAction: 'all',
|
||||
editable: true,
|
||||
name: 'LDAP_TYPE',
|
||||
id: 'LDAP_TYPE',
|
||||
width: 130,
|
||||
allowBlank: false,
|
||||
store: [["ldap", "OpenLDAP"], ["ad", "Active Directory"], ["ds", "389 DS"]],
|
||||
listeners:{
|
||||
select: function(combo, record) {
|
||||
ldapFormIdentifier.setValue((combo.getValue() == "ad")? "samaccountname" : "uid");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var ldapFormAutoRegister = new Ext.form.ComboBox({
|
||||
valueField: 'ID',
|
||||
displayField: 'VALUE',
|
||||
value: '0',
|
||||
|
||||
fieldLabel: '<span style="color: red">*</span>' + "Enable automatic register",
|
||||
typeAhead: true,
|
||||
forceSelection: true,
|
||||
triggerAction: 'all',
|
||||
editable: true,
|
||||
name: 'AUTH_SOURCE_AUTO_REGISTER',
|
||||
id: 'AUTH_SOURCE_AUTO_REGISTER',
|
||||
width: 130,
|
||||
allowBlank: false,
|
||||
store: [['0',_('ID_NO')],['1',_('ID_YES')]]
|
||||
});
|
||||
|
||||
var ldapFormServerName = new Ext.form.TextField({
|
||||
fieldLabel: '<span style="color: red">*</span>' + "Server Address",
|
||||
name: 'AUTH_SOURCE_SERVER_NAME',
|
||||
id: 'AUTH_SOURCE_SERVER_NAME',
|
||||
autoCreate: {tag: 'input', type: 'text', maxlength: '50'},
|
||||
allowBlank: false,
|
||||
width: 210
|
||||
});
|
||||
|
||||
var ldapFormPort = new Ext.form.NumberField({
|
||||
fieldLabel: '<span style="color: red">*</span>' + _('ID_PORT'),
|
||||
name: 'AUTH_SOURCE_PORT',
|
||||
id: 'AUTH_SOURCE_PORT',
|
||||
allowBlank: true,
|
||||
width: 130,
|
||||
value: '389',
|
||||
autoCreate: {tag: 'input', type: 'text', maxlength: '5'}
|
||||
});
|
||||
|
||||
var ldapFormTls = new Ext.form.ComboBox({
|
||||
valueField: 'ID',
|
||||
displayField: 'VALUE',
|
||||
|
||||
fieldLabel: '<span style="color: red">*</span>' + _('ID_ENABLED_TLS'),
|
||||
typeAhead: true,
|
||||
forceSelection: true,
|
||||
triggerAction: 'all',
|
||||
editable: true,
|
||||
name: 'AUTH_SOURCE_ENABLED_TLS',
|
||||
id: 'AUTH_SOURCE_ENABLED_TLS',
|
||||
width: 130,
|
||||
allowBlank: false,
|
||||
value: '0',
|
||||
store: [['0',_('ID_NO')],['1',_('ID_YES')]]
|
||||
});
|
||||
|
||||
var ldapFormBaseDN = new Ext.form.TextField({
|
||||
fieldLabel: '<span style="color: red">*</span>' + _('ID_BASE_DN'),
|
||||
name: 'AUTH_SOURCE_BASE_DN',
|
||||
id: 'AUTH_SOURCE_BASE_DN',
|
||||
autoCreate: {tag: 'input', type: 'text', maxlength: '128'},
|
||||
allowBlank: false,
|
||||
width: 210
|
||||
});
|
||||
|
||||
var ldapFormAnonymous = new Ext.form.ComboBox({
|
||||
valueField: 'ID',
|
||||
displayField: 'VALUE',
|
||||
|
||||
fieldLabel: '<span style="color: red">*</span>' + _('ID_ANONYMOUS'),
|
||||
typeAhead: true,
|
||||
forceSelection: true,
|
||||
triggerAction: 'all',
|
||||
editable: true,
|
||||
name: 'AUTH_ANONYMOUS',
|
||||
id: 'AUTH_ANONYMOUS',
|
||||
width: 130,
|
||||
allowBlank: false,
|
||||
value: '0',
|
||||
store: [['0',_('ID_NO')],['1',_('ID_YES')]],
|
||||
listeners:{
|
||||
select: function(combo, record) {
|
||||
var arrayObject = [];
|
||||
arrayObject["ldapFormSearchUser"] = ldapFormSearchUser;
|
||||
arrayObject["ldapFormPassword"] = ldapFormPassword;
|
||||
|
||||
ldapFormAnonymousOnChange(combo, arrayObject);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var ldapFormSearchUser = new Ext.form.TextField({
|
||||
fieldLabel: '<span style="color: red">*</span>' + _('ID_USERNAME'),
|
||||
name: 'AUTH_SOURCE_SEARCH_USER',
|
||||
id: 'AUTH_SOURCE_SEARCH_USER',
|
||||
autoCreate: {tag: 'input', type: 'text', maxlength: '128'},
|
||||
allowBlank: false,
|
||||
width: 210
|
||||
});
|
||||
|
||||
var ldapFormPassword = new Ext.form.TextField({
|
||||
fieldLabel: '<span style="color: red">*</span>' + _('ID_PASSWORD'),
|
||||
inputType: 'password',
|
||||
name: 'AUTH_SOURCE_PASSWORD',
|
||||
id: 'AUTH_SOURCE_PASSWORD',
|
||||
autoCreate: {tag: 'input', type: 'text', maxlength: '32'},
|
||||
allowBlank: false,
|
||||
width: 210
|
||||
});
|
||||
|
||||
var ldapFormIdentifier = new Ext.form.TextField({
|
||||
fieldLabel: '<span style="color: red">*</span>' + "User Identifier",
|
||||
name: 'AUTH_SOURCE_IDENTIFIER_FOR_USER',
|
||||
id: 'AUTH_SOURCE_IDENTIFIER_FOR_USER',
|
||||
autoCreate: {tag: 'input', type: 'text', maxlength: '20'},
|
||||
allowBlank: false,
|
||||
width: 210,
|
||||
value: 'uid'
|
||||
});
|
||||
|
||||
var ldapFormUsersFilter = new Ext.form.TextField({
|
||||
fieldLabel: "Filter to search users",
|
||||
name: 'AUTH_SOURCE_USERS_FILTER',
|
||||
id: 'AUTH_SOURCE_USERS_FILTER',
|
||||
autoCreate: {tag: 'input', type: 'text', maxlength: '200'},
|
||||
allowBlank: true,
|
||||
width: 210
|
||||
});
|
||||
|
||||
var ldapFormRetiredEmployees = new Ext.form.TextField({
|
||||
fieldLabel: "OU for Retired Employees OU",
|
||||
name: 'AUTH_SOURCE_RETIRED_OU',
|
||||
id: 'AUTH_SOURCE_RETIRED_OU',
|
||||
autoCreate: {tag: 'input', type: 'text', maxlength: '128'},
|
||||
allowBlank: true,
|
||||
width: 210
|
||||
});
|
||||
|
||||
var ldapFormAttrinuteIds = new Ext.form.Hidden({
|
||||
name: 'AUTH_SOURCE_ATTRIBUTE_IDS',
|
||||
id: 'AUTH_SOURCE_ATTRIBUTE_IDS'
|
||||
});
|
||||
|
||||
var ldapFormShowGrid = new Ext.form.Hidden({
|
||||
name: 'AUTH_SOURCE_SHOWGRID',
|
||||
id: 'AUTH_SOURCE_SHOWGRID'
|
||||
});
|
||||
|
||||
var ldapFormGridText = new Ext.form.Hidden({
|
||||
name: 'AUTH_SOURCE_GRID_TEXT',
|
||||
id: 'AUTH_SOURCE_GRID_TEXT'
|
||||
});
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var ldapFormData = new Ext.form.FieldSet({
|
||||
style: {
|
||||
border: "0px"
|
||||
},
|
||||
|
||||
labelWidth : 170,
|
||||
items :[
|
||||
ldapFormId, ldapFormName, ldapFormProvider, ldapFormType, ldapFormAutoRegister, ldapFormServerName,
|
||||
ldapFormPort, ldapFormTls, ldapFormBaseDN, ldapFormAnonymous, ldapFormSearchUser, ldapFormPassword,
|
||||
ldapFormIdentifier, ldapFormUsersFilter, ldapFormRetiredEmployees,
|
||||
{
|
||||
xtype: 'label',
|
||||
fieldLabel: ' ',
|
||||
id:'passwordReview',
|
||||
width: 300,
|
||||
style: 'font: 9px tahoma,arial,helvetica,sans-serif;',
|
||||
text: "(Default set to (&(!(objectClass=organizationalUnit))))",
|
||||
labelSeparator: ''
|
||||
}, ldapFormAttrinuteIds, ldapFormShowGrid, ldapFormGridText
|
||||
]
|
||||
});
|
||||
|
||||
var pnlData = new Ext.Panel({
|
||||
height: 425,
|
||||
|
||||
bodyStyle: "border-top: 0px; padding-top: 10px;",
|
||||
|
||||
title: "<div style=\"height: 20px;\">" + _("ID_INFORMATION") + "</div>",
|
||||
|
||||
items: [ldapFormData]
|
||||
});
|
||||
|
||||
486
workflow/engine/templates/ldapAdvanced/ldapAdvancedList.js
Executable file
486
workflow/engine/templates/ldapAdvanced/ldapAdvancedList.js
Executable file
File diff suppressed because it is too large
Load Diff
317
workflow/engine/templates/ldapAdvanced/ldapAdvancedSearch.js
Normal file
317
workflow/engine/templates/ldapAdvanced/ldapAdvancedSearch.js
Normal file
File diff suppressed because it is too large
Load Diff
15
workflow/engine/templates/ldapAdvanced/library.js
Executable file
15
workflow/engine/templates/ldapAdvanced/library.js
Executable file
@@ -0,0 +1,15 @@
|
||||
function redirectPage(page){
|
||||
window.location = page;
|
||||
}
|
||||
|
||||
function randomNum(inf, sup){
|
||||
numPos = sup - inf;
|
||||
aleat = Math.random() * numPos;
|
||||
aleat = Math.round(aleat);
|
||||
return parseInt(inf) + aleat;
|
||||
}
|
||||
|
||||
function renderStatus (data, metadata, record, rowIndex, columnIndex, store) {
|
||||
return "<span style=\"color: " + ((record.data.IMPORT == 1)? "#005E20" : "#FF0000") + ";\">" + record.data.STATUS.toUpperCase() + "</span>";
|
||||
}
|
||||
|
||||
180
workflow/engine/templates/ldapAdvanced/searchSummary.js
Executable file
180
workflow/engine/templates/ldapAdvanced/searchSummary.js
Executable file
@@ -0,0 +1,180 @@
|
||||
var caseData = '';
|
||||
var appTitle = new Ext.form.Label({
|
||||
fieldLabel: "Case Title",
|
||||
labelStyle: 'font-weight:bold;padding-right:30px;'
|
||||
});
|
||||
|
||||
var process = new Ext.form.Label({
|
||||
fieldLabel: "Process Uid",
|
||||
labelStyle: 'font-weight:bold;padding-right:35px;'
|
||||
});
|
||||
|
||||
var processTitle = new Ext.form.Label({
|
||||
fieldLabel: "Process",
|
||||
labelStyle: 'font-weight:bold;padding-right:35px;'
|
||||
});
|
||||
|
||||
var appUid = new Ext.form.Label({
|
||||
fieldLabel: "App Uid",
|
||||
labelStyle: 'font-weight:bold;padding-right:35px;'
|
||||
});
|
||||
|
||||
var caseNumber = new Ext.form.Label({
|
||||
fieldLabel: "Case number",
|
||||
labelStyle: 'font-weight:bold;padding-right:35px;'
|
||||
});
|
||||
|
||||
var initUser = new Ext.form.Label({
|
||||
fieldLabel: "Init user",
|
||||
labelStyle: 'font-weight:bold;padding-right:35px;'
|
||||
});
|
||||
|
||||
var finishUser = new Ext.form.Label({
|
||||
fieldLabel: "Finish user",
|
||||
labelStyle: 'font-weight:bold;padding-right:35px;'
|
||||
});
|
||||
|
||||
var createDate = new Ext.form.Label({
|
||||
fieldLabel: "Create date",
|
||||
labelStyle: 'font-weight:bold;padding-right:35px;'
|
||||
});
|
||||
|
||||
var finishDate = new Ext.form.Label({
|
||||
fieldLabel: "Finish date",
|
||||
labelStyle: 'font-weight:bold;padding-right:35px;'
|
||||
});
|
||||
|
||||
var fileName = new Ext.form.Label({
|
||||
fieldLabel: "File Name",
|
||||
labelStyle: 'font-weight:bold;padding-right:35px;'
|
||||
});
|
||||
|
||||
var statusCaseWin = new Ext.form.Label({
|
||||
fieldLabel: "Status",
|
||||
labelStyle: 'font-weight:bold;padding-right:35px;'
|
||||
});
|
||||
|
||||
var formCase = new Ext.FormPanel({
|
||||
labelWidth : 120,
|
||||
labelAlign : 'right',
|
||||
autoScroll: true,
|
||||
frame: true,
|
||||
bodyStyle : 'padding-top:20px;padding-left:20px;',
|
||||
items:[
|
||||
appTitle,
|
||||
caseNumber,
|
||||
processTitle,
|
||||
initUser,
|
||||
finishUser,
|
||||
createDate,
|
||||
finishDate,
|
||||
fileName,
|
||||
statusCaseWin
|
||||
],
|
||||
buttons:[{
|
||||
text : "Restore case",
|
||||
id: 'BUTTON_UNARCHIVE_CASE',
|
||||
iconCls: 'button_menu_ext ss_sprite ss_folder_go',
|
||||
formBind : true,
|
||||
handler : function(){
|
||||
if (caseData!='') {
|
||||
Ext.MessageBox.confirm("Confirm", "Are you sure you want to restore the case?", function (val) {
|
||||
if (val == 'yes') {
|
||||
dataCase = caseData;
|
||||
Ext.MessageBox.show({
|
||||
msg: "Restoring case" + ' ' + dataCase.CASE_NUMBER + ' ...',
|
||||
progressText: 'Saving...',
|
||||
width:300,
|
||||
wait:true,
|
||||
waitConfig: {interval:200},
|
||||
animEl: 'mb7'
|
||||
});
|
||||
Ext.Ajax.request({
|
||||
params: {
|
||||
'APP_UID': dataCase.APP_UID,
|
||||
'FILENAME_TAR': dataCase.FILENAME_TAR,
|
||||
'functionExecute': 'unarchiveCase'
|
||||
},
|
||||
url : 'controllers/searchListProxy.php',
|
||||
success: function (returnData) {
|
||||
Ext.MessageBox.hide();
|
||||
|
||||
var resp = Ext.decode(returnData.responseText);
|
||||
if (resp.success) {
|
||||
Ext.MessageBox.show({
|
||||
title: 'Case Unarhive',
|
||||
msg: "Case" + ' ' + dataCase.CASE_NUMBER + ' ' + "Restored sucessfully",
|
||||
buttons: Ext.MessageBox.OK,
|
||||
animEl: 'mb9',
|
||||
icon: Ext.MessageBox.INFO
|
||||
});
|
||||
} else {
|
||||
Ext.MessageBox.show({
|
||||
title: "Error",
|
||||
msg: resp.message,
|
||||
buttons: Ext.MessageBox.OK,
|
||||
animEl: 'mb9',
|
||||
icon: Ext.MessageBox.ERROR
|
||||
});
|
||||
}
|
||||
|
||||
storeGridSearch.load();
|
||||
},
|
||||
failure: function () {
|
||||
Ext.MessageBox.alert("Error", "Error in server");
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
text : _('ID_CLOSE'),
|
||||
iconCls: 'button_menu_ext ss_sprite ss_folder_delete',
|
||||
formBind : true,
|
||||
handler : function(){
|
||||
summaryWindow.hide();
|
||||
}
|
||||
}]
|
||||
});
|
||||
|
||||
var summaryWindow = new Ext.Window({
|
||||
title: "Detail Case",
|
||||
layout: 'fit',
|
||||
width: 500,
|
||||
height: 320,
|
||||
resizable: true,
|
||||
closable: true,
|
||||
closeAction : 'hide',
|
||||
modal: true,
|
||||
autoScroll:true,
|
||||
constrain: true,
|
||||
items: [formCase]
|
||||
});
|
||||
|
||||
function showCaseSummary(dataCase) {
|
||||
if (dataCase) {
|
||||
caseData = dataCase;
|
||||
|
||||
if(dataCase.STATUS == 'RESTORED'){
|
||||
Ext.getCmp('BUTTON_UNARCHIVE_CASE').disable();
|
||||
} else {
|
||||
Ext.getCmp('BUTTON_UNARCHIVE_CASE').enable();
|
||||
}
|
||||
|
||||
appTitle.setText(dataCase.APP_TITLE, false);
|
||||
process.setText(dataCase.PRO_UID, false);
|
||||
processTitle.setText(dataCase.PRO_TITLE, false);
|
||||
appUid.setText(dataCase.APP_UID, false);
|
||||
caseNumber.setText(dataCase.CASE_NUMBER, false);
|
||||
initUser.setText(dataCase.INIT_USER_NAME, false);
|
||||
finishUser.setText(dataCase.FINISH_USER_NAME, false);
|
||||
createDate.setText(renderDate(dataCase.CREATE_DATE, false));
|
||||
finishDate.setText(renderDate(dataCase.FINISH_DATE, false));
|
||||
fileName.setText(dataCase.FILENAME_TAR+'.tar', false);
|
||||
statusCaseWin.setText(dataCase.STATUS, false);
|
||||
|
||||
summaryWindow.show();
|
||||
}
|
||||
}
|
||||
11
workflow/engine/xmlform/ldapAdvanced/gridAttribute.xml
Executable file
11
workflow/engine/xmlform/ldapAdvanced/gridAttribute.xml
Executable file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<dynaForm type="grid" name="ldapAdvanced/gridAttribute" enabletemplate="0" mode="">
|
||||
<attributeLdap type="text" maxlength="64" validate="Any" required="0" readonly="0" size="15" mode="edit" btn_cancel="Cancel">
|
||||
<en><![CDATA[LDAP Field]]></en>
|
||||
<pt-BR><![CDATA[Campo LDAP]]></pt-BR>
|
||||
</attributeLdap>
|
||||
<attributeUser type="dropdown" required="0" readonly="0" mode="edit" options="Array" btn_cancel="Cancel">
|
||||
<en><![CDATA[User Field]]></en>
|
||||
<pt-BR><![CDATA[Campo de Usuário]]></pt-BR>
|
||||
</attributeUser>
|
||||
</dynaForm>
|
||||
11
workflow/engine/xmlform/ldapAdvanced/ldapAdvanced.xml
Executable file
11
workflow/engine/xmlform/ldapAdvanced/ldapAdvanced.xml
Executable file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<dynaForm name="Ldap Setup Form" type="xmlform" width="550">
|
||||
<TITLE type="title" group="1">
|
||||
<en><![CDATA[Ldap Advance Plugin]]></en>
|
||||
<pt-BR><![CDATA[Ldap Plugin Adiantamento]]></pt-BR>
|
||||
</TITLE>
|
||||
<HelpText type="subtitle" maxlength="100" size="60">
|
||||
<en><![CDATA[Please check the User Section in order to Synchronize or Import users from an authentication source using this plugin. There is no further configuration needed.]]></en>
|
||||
<pt-BR><![CDATA[Por favor verifique a seção do usuário, a fim de sincronizar ou importar usuários a partir de uma fonte de autenticação usando este plugin. Não há nenhuma configuração adicional necessário.]]></pt-BR>
|
||||
</HelpText>
|
||||
</dynaForm>
|
||||
215
workflow/engine/xmlform/ldapAdvanced/ldapAdvancedEdit.xml
Executable file
215
workflow/engine/xmlform/ldapAdvanced/ldapAdvancedEdit.xml
Executable file
@@ -0,0 +1,215 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<dynaForm name="authSources/ldap_Edit" type="xmlform" width="650" enabletemplate="0" mode="">
|
||||
<title type="title">
|
||||
<en><![CDATA[Authentication Source Information]]></en>
|
||||
<pt-BR><![CDATA[Informações de fonte de autenticação]]></pt-BR>
|
||||
</title>
|
||||
<AUTH_SOURCE_UID type="hidden"/>
|
||||
<AUTH_SOURCE_NAME type="text" size="50" maxlength="50" required="1">
|
||||
<en><![CDATA[Name]]></en>
|
||||
<pt-BR><![CDATA[Nome]]></pt-BR>
|
||||
</AUTH_SOURCE_NAME>
|
||||
<AUTH_SOURCE_PROVIDER type="hidden" defaultValue="ldap"/>
|
||||
<LDAP_TYPE type="dropdown" required="0">
|
||||
<en><![CDATA[Type]]><option name="ldap"><![CDATA[OpenLDAP]]></option><option name="ad"><![CDATA[Active Directory]]></option><option name="ds"><![CDATA[389 DS]]></option></en>
|
||||
<pt-BR><![CDATA[Tipo]]><option name="ldap"><![CDATA[OpenLDAP]]></option><option name="ad"><![CDATA[Active Directory]]></option><option name="ds"><![CDATA[389 DS]]></option></pt-BR>
|
||||
</LDAP_TYPE>
|
||||
<AUTH_SOURCE_AUTO_REGISTER type="dropdown">
|
||||
<en><![CDATA[Enable automatic register]]><option name="0"><![CDATA[No]]></option><option name="1"><![CDATA[Yes]]></option></en>
|
||||
<pt-BR><![CDATA[Ativado automatic registrar]]><option name="0"><![CDATA[Não]]></option><option name="1"><![CDATA[Sim]]></option></pt-BR>
|
||||
</AUTH_SOURCE_AUTO_REGISTER>
|
||||
<AUTH_SOURCE_SERVER_NAME type="text" size="50" maxlength="50" required="1">
|
||||
<en><![CDATA[Server Address]]></en>
|
||||
<pt-BR><![CDATA[Endereço do Servidor]]></pt-BR>
|
||||
</AUTH_SOURCE_SERVER_NAME>
|
||||
<AUTH_SOURCE_PORT type="text" size="5" maxlength="5" required="1" defaultValue="389" validate="Int">
|
||||
<en><![CDATA[Port]]></en>
|
||||
<pt-BR><![CDATA[Porto]]></pt-BR>
|
||||
</AUTH_SOURCE_PORT>
|
||||
<AUTH_SOURCE_ENABLED_TLS type="dropdown">
|
||||
<en><![CDATA[Enabled TLS]]><option name="0"><![CDATA[No]]></option><option name="1"><![CDATA[Yes]]></option></en>
|
||||
<pt-BR><![CDATA[Ativado TLS]]><option name="0"><![CDATA[Não]]></option><option name="1"><![CDATA[Sim]]></option></pt-BR>
|
||||
</AUTH_SOURCE_ENABLED_TLS>
|
||||
<AUTH_SOURCE_BASE_DN type="text" size="50" maxlength="128" required="1">
|
||||
<en><![CDATA[Base DN]]></en>
|
||||
<pt-BR><![CDATA[Base DN]]></pt-BR>
|
||||
</AUTH_SOURCE_BASE_DN>
|
||||
<AUTH_ANONYMOUS type="dropdown">
|
||||
<en><![CDATA[Anonymous]]><option name="0"><![CDATA[No]]></option><option name="1"><![CDATA[Yes]]></option></en>
|
||||
<pt-BR><![CDATA[anônimo]]><option name="0"><![CDATA[Não]]></option><option name="1"><![CDATA[Sim]]></option></pt-BR>
|
||||
</AUTH_ANONYMOUS>
|
||||
<AUTH_SOURCE_SEARCH_USER type="text" size="50" maxlength="128" required="0">
|
||||
<en><![CDATA[Username]]></en>
|
||||
<pt-BR><![CDATA[Usuário]]></pt-BR>
|
||||
</AUTH_SOURCE_SEARCH_USER>
|
||||
<AUTH_SOURCE_PASSWORD type="password" size="20" maxlength="32" required="0">
|
||||
<en><![CDATA[Password]]></en>
|
||||
<pt-BR><![CDATA[Senha]]></pt-BR>
|
||||
</AUTH_SOURCE_PASSWORD>
|
||||
<AUTH_SOURCE_IDENTIFIER_FOR_USER type="text" size="20" maxlength="20" required="1" defaultValue="uid">
|
||||
<en><![CDATA[User Identifier]]></en>
|
||||
<pt-BR><![CDATA[Identificador de usuário]]></pt-BR>
|
||||
</AUTH_SOURCE_IDENTIFIER_FOR_USER>
|
||||
<AUTH_SOURCE_USERS_FILTER type="text" size="50" maxlength="200" required="0" defaultValue="">
|
||||
<en><![CDATA[Filter to search users (Default set to (&(!(objectClass=organizationalUnit))))]]></en>
|
||||
<pt-BR><![CDATA[Filtro para os usuários de busca (Default set to (&(!(objectClass=organizationalUnit))))]]></pt-BR>
|
||||
</AUTH_SOURCE_USERS_FILTER>
|
||||
<AUTH_SOURCE_RETIRED_OU type="text" size="50" maxlength="128" required="0">
|
||||
<en><![CDATA[OU for Retired Employees OU]]></en>
|
||||
<pt-BR><![CDATA[OU ao Aposentado UO]]></pt-BR>
|
||||
</AUTH_SOURCE_RETIRED_OU>
|
||||
<AUTH_SOURCE_ATTRIBUTE_IDS type="hidden"/>
|
||||
<AUTH_SOURCE_SHOWGRID_FLAG type="hidden"/>
|
||||
<AUTH_SOURCE_GRID_TEXT type="hidden"/>
|
||||
<AUTH_SOURCE_ATTRIBUTE_SUBTITLE type="subtitle" enablehtml="1" btn_cancel="Cancel" required="0" readonly="0" savelabel="0">
|
||||
<en><![CDATA[<input type="checkbox" name="form[AUTH_SOURCE_SHOWGRID]" id="form[AUTH_SOURCE_SHOWGRID]"> Match attributes to sync]]></en>
|
||||
<pt-BR><![CDATA[<input type="checkbox" name="form[AUTH_SOURCE_SHOWGRID]" id="form[AUTH_SOURCE_SHOWGRID]"> Combinar atributos para sincronizar]]></pt-BR>
|
||||
</AUTH_SOURCE_ATTRIBUTE_SUBTITLE>
|
||||
<AUTH_SOURCE_GRID_ATTRIBUTE type="grid" xmlgrid="ldapAdvanced/gridAttribute" addrow="1" deleterow="1" btn_cancel="Cancel"/>
|
||||
<SUBTITLETESTCONNECTION type="subtitle">
|
||||
<en><![CDATA[Minimum data required to run the "Test Connection": "Server Address, Port, Enabled TLS, Anonymous, Username, Password"]]></en>
|
||||
<pt-BR><![CDATA[Dados mínimos necessários para executar o "Test Connection": "Server Address, Port, TLS Habilitado, Anonymous, Nome de usuário, Senha"]]></pt-BR>
|
||||
</SUBTITLETESTCONNECTION>
|
||||
<btnSave type="submit">
|
||||
<en><![CDATA[Save]]></en>
|
||||
<pt-BR><![CDATA[Salvar]]></pt-BR>
|
||||
</btnSave>
|
||||
<BTNTESTCONNECTION type="button" onclick="testConnection();">
|
||||
<en><![CDATA[Test connection]]></en>
|
||||
<pt-BR><![CDATA[Teste de conexão]]></pt-BR>
|
||||
</BTNTESTCONNECTION>
|
||||
<btnCancel type="button" onclick="history.go(-1);">
|
||||
<en><![CDATA[Cancel]]></en>
|
||||
<pt-BR><![CDATA[Cancel]]></pt-BR>
|
||||
</btnCancel>
|
||||
<JS type="javascript"><![CDATA[
|
||||
|
||||
var dynaformOnload = function() {
|
||||
getField('AUTH_SOURCE_SHOWGRID').checked = (getField('AUTH_SOURCE_SHOWGRID_FLAG').value == 1) ? true : false;
|
||||
var fieldGridTd = getField('AUTH_SOURCE_GRID_ATTRIBUTE').parentNode.parentNode.parentNode;
|
||||
fieldGridTd.style.display = 'none';
|
||||
leimnud.event.add(getField('AUTH_ANONYMOUS'), 'change', hideShowSearchUser);
|
||||
leimnud.event.add(getField('LDAP_TYPE'), 'change', hideShowSuggest);
|
||||
leimnud.event.add(getField('AUTH_SOURCE_SHOWGRID'), 'click', showGrid);
|
||||
hideShowSearchUser();
|
||||
hideShowSuggest();
|
||||
showGrid();
|
||||
|
||||
var valuesDrop = getField('AUTH_SOURCE_ATTRIBUTE_IDS').value;
|
||||
valuesDropArray = valuesDrop.split('|');
|
||||
|
||||
for (var i = 0 ; i < valuesDropArray.length ; i++) {
|
||||
if (valuesDropArray[i] != '') {
|
||||
var iRows = Number_Rows_Grid('AUTH_SOURCE_GRID_ATTRIBUTE','attributeLdap');
|
||||
for (cont=1 ; cont<=iRows ; cont=cont+1) {
|
||||
eval(" var newOption = document.createElement('option'); newOption.text = valuesDropArray[i]; newOption.value = valuesDropArray[i]; try { getField('AUTH_SOURCE_GRID_ATTRIBUTE][" + cont + "][attributeUser').add(newOption, null);} catch(ex) { getField('AUTH_SOURCE_GRID_ATTRIBUTE][" + cont + "][attributeUser').add(newOption);}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var valuesGrid = getField('AUTH_SOURCE_GRID_TEXT').value;
|
||||
valuesGridArray = valuesGrid.split('|');
|
||||
var fil = 1;
|
||||
for (var i = 0 ; i < valuesGridArray.length ; i++) {
|
||||
if(valuesGridArray[i] != '')
|
||||
{
|
||||
var valuesFielddGrid = valuesGridArray[i].split("/");
|
||||
getField('AUTH_SOURCE_GRID_ATTRIBUTE][' + fil + '][attributeUser').value = valuesFielddGrid['1'];
|
||||
fil++;
|
||||
}
|
||||
}
|
||||
|
||||
function showGrid() {
|
||||
if (getField('AUTH_SOURCE_SHOWGRID').checked == true) {
|
||||
fieldGridTd.style.display = 'block';
|
||||
fieldGridTd.removeAttribute("style",0);
|
||||
} else {
|
||||
fieldGridTd.style.display = 'none';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var hideShowSearchUser = function() {
|
||||
if (getField('AUTH_ANONYMOUS').value == '1') {
|
||||
hideRowById('AUTH_SOURCE_SEARCH_USER');
|
||||
hideRowById('AUTH_SOURCE_PASSWORD');
|
||||
}
|
||||
else {
|
||||
showRowById('AUTH_SOURCE_SEARCH_USER');
|
||||
showRowById('AUTH_SOURCE_PASSWORD');
|
||||
}
|
||||
};
|
||||
|
||||
var hideShowSuggest = function ()
|
||||
{
|
||||
getField("AUTH_SOURCE_IDENTIFIER_FOR_USER").value = (getField("LDAP_TYPE").value == "ad")? "samaccountname" : "uid";
|
||||
};
|
||||
|
||||
var testConnection = function ()
|
||||
{
|
||||
var strArgs = "functionAccion=ldapTestConnection&";
|
||||
strArgs += "AUTH_SOURCE_SERVER_NAME=" + getField("AUTH_SOURCE_SERVER_NAME").value + "&";
|
||||
strArgs += "AUTH_SOURCE_PORT=" + getField("AUTH_SOURCE_PORT").value + "&";
|
||||
strArgs += "AUTH_SOURCE_ENABLED_TLS=" + getField("AUTH_SOURCE_ENABLED_TLS").value + "&";
|
||||
strArgs += "AUTH_ANONYMOUS=" + getField("AUTH_ANONYMOUS").value + "&";
|
||||
strArgs += "AUTH_SOURCE_SEARCH_USER=" + getField("AUTH_SOURCE_SEARCH_USER").value + "&";
|
||||
strArgs += "AUTH_SOURCE_PASSWORD=" + getField("AUTH_SOURCE_PASSWORD").value + "&";
|
||||
strArgs += "AUTH_SOURCE_VERSION=3";
|
||||
|
||||
var rpcAjax = new leimnud.module.rpc.xmlhttp({
|
||||
url: "../ldapAdvanced/controllers/ldapAdvancedProxy.php",
|
||||
method: "POST",
|
||||
args: strArgs
|
||||
});
|
||||
|
||||
rpcAjax.callback = function (rpc)
|
||||
{
|
||||
var dataResponse = rpc.xmlhttp.responseText.parseJSON();
|
||||
|
||||
if (dataResponse.status) {
|
||||
var panel = new leimnud.module.panel();
|
||||
|
||||
panel.options = {
|
||||
statusBarButtons: [{value: _("ID_ACCEPT")}],
|
||||
position: {center: true},
|
||||
size: {
|
||||
w: 400,
|
||||
h: 125
|
||||
},
|
||||
control: {
|
||||
close: true,
|
||||
resize: false
|
||||
},
|
||||
fx: {modal: true}
|
||||
};
|
||||
|
||||
panel.setStyle = {
|
||||
content:{
|
||||
padding: 10,
|
||||
paddingLeft: 50,
|
||||
textAlign: "left",
|
||||
background: "url(/images/" + ((dataResponse.status == "OK")? "dialog-ok-apply" : "error") + ".png)",
|
||||
backgroundRepeat: "no-repeat",
|
||||
backgroundPosition: "2% 10%",
|
||||
backgroundColor: "transparent",
|
||||
borderWidth: 0
|
||||
}
|
||||
};
|
||||
|
||||
panel.make();
|
||||
panel.addContent((dataResponse.status == "OK")? "Successfully connected" : dataResponse.message);
|
||||
panel.fixContent();
|
||||
panel.elements.statusBarButtons[0].onmouseup = function ()
|
||||
{
|
||||
panel.remove();
|
||||
|
||||
return false;
|
||||
}.extend(this);
|
||||
}
|
||||
}.extend(this);
|
||||
|
||||
rpcAjax.make();
|
||||
};
|
||||
]]></JS>
|
||||
</dynaForm>
|
||||
|
||||
1
workflow/engine/xmlform/ldapAdvanced/ldapAdvancedFlag
Executable file
1
workflow/engine/xmlform/ldapAdvanced/ldapAdvancedFlag
Executable file
@@ -0,0 +1 @@
|
||||
Bandera para habilitar nueva interfaz extjs
|
||||
Reference in New Issue
Block a user