BUG 000 - correction form new Authentication Sources, IE format
This commit is contained in:
@@ -178,7 +178,6 @@ class RBAC
|
|||||||
file_put_contents( $filePath, serialize ( $this->aUserInfo ) );
|
file_put_contents( $filePath, serialize ( $this->aUserInfo ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* verification the register automatic
|
* verification the register automatic
|
||||||
*
|
*
|
||||||
@@ -889,7 +888,6 @@ class RBAC
|
|||||||
function getAuthenticationSources($start,$limit,$filter='') {
|
function getAuthenticationSources($start,$limit,$filter='') {
|
||||||
return $this->authSourcesObj->getAuthenticationSources($start,$limit,$filter);
|
return $this->authSourcesObj->getAuthenticationSources($start,$limit,$filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this function gets all authentication source
|
* this function gets all authentication source
|
||||||
* Authentication Sources
|
* Authentication Sources
|
||||||
@@ -900,9 +898,16 @@ class RBAC
|
|||||||
* @return $this->authSourcesObj->load
|
* @return $this->authSourcesObj->load
|
||||||
*/
|
*/
|
||||||
function getAuthSource($sUID) {
|
function getAuthSource($sUID) {
|
||||||
return $this->authSourcesObj->load($sUID);
|
$data = $this->authSourcesObj->load($sUID);
|
||||||
|
$pass =explode("_",$data['AUTH_SOURCE_PASSWORD']);
|
||||||
|
foreach($pass as $index => $value) {
|
||||||
|
if($value == '2NnV3ujj3w'){
|
||||||
|
$data['AUTH_SOURCE_PASSWORD'] = G::decrypt($pass[0],$data['AUTH_SOURCE_SERVER_NAME']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$this->authSourcesObj->Fields = $data;
|
||||||
|
return $this->authSourcesObj->Fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* this function creates an authentication source
|
* this function creates an authentication source
|
||||||
* Authentication Sources
|
* Authentication Sources
|
||||||
@@ -913,6 +918,7 @@ class RBAC
|
|||||||
* @return $this->authSourcesObj->create
|
* @return $this->authSourcesObj->create
|
||||||
*/
|
*/
|
||||||
function createAuthSource($aData) {
|
function createAuthSource($aData) {
|
||||||
|
$aData['AUTH_SOURCE_PASSWORD'] = G::encrypt($aData['AUTH_SOURCE_PASSWORD'],$aData['AUTH_SOURCE_SERVER_NAME'])."_2NnV3ujj3w";
|
||||||
$this->authSourcesObj->create($aData);
|
$this->authSourcesObj->create($aData);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -927,6 +933,7 @@ class RBAC
|
|||||||
* @return $this->authSourcesObj->create
|
* @return $this->authSourcesObj->create
|
||||||
*/
|
*/
|
||||||
function updateAuthSource($aData) {
|
function updateAuthSource($aData) {
|
||||||
|
$aData['AUTH_SOURCE_PASSWORD'] = G::encrypt($aData['AUTH_SOURCE_PASSWORD'],$aData['AUTH_SOURCE_SERVER_NAME'])."_2NnV3ujj3w";
|
||||||
$this->authSourcesObj->update($aData);
|
$this->authSourcesObj->update($aData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,6 +118,12 @@ class LDAP
|
|||||||
$sKeyword = trim($sKeyword);
|
$sKeyword = trim($sKeyword);
|
||||||
$RBAC = RBAC::getSingleton();
|
$RBAC = RBAC::getSingleton();
|
||||||
$aAuthSource = $RBAC->authSourcesObj->load($this->sAuthSource);
|
$aAuthSource = $RBAC->authSourcesObj->load($this->sAuthSource);
|
||||||
|
$pass =explode("_",$aAuthSource['AUTH_SOURCE_PASSWORD']);
|
||||||
|
foreach($pass as $index => $value) {
|
||||||
|
if($value == '2NnV3ujj3w'){
|
||||||
|
$aAuthSource['AUTH_SOURCE_PASSWORD'] = G::decrypt($pass[0],$aAuthSource['AUTH_SOURCE_SERVER_NAME']);
|
||||||
|
}
|
||||||
|
}
|
||||||
$oLink = @ldap_connect($aAuthSource['AUTH_SOURCE_SERVER_NAME'], $aAuthSource['AUTH_SOURCE_PORT']);
|
$oLink = @ldap_connect($aAuthSource['AUTH_SOURCE_SERVER_NAME'], $aAuthSource['AUTH_SOURCE_PORT']);
|
||||||
@ldap_set_option($oLink, LDAP_OPT_PROTOCOL_VERSION, $aAuthSource['AUTH_SOURCE_VERSION']);
|
@ldap_set_option($oLink, LDAP_OPT_PROTOCOL_VERSION, $aAuthSource['AUTH_SOURCE_VERSION']);
|
||||||
@ldap_set_option($oLink, LDAP_OPT_REFERRALS, 0);
|
@ldap_set_option($oLink, LDAP_OPT_REFERRALS, 0);
|
||||||
|
|||||||
@@ -6,18 +6,18 @@
|
|||||||
Ext.onReady(function(){
|
Ext.onReady(function(){
|
||||||
|
|
||||||
var txtSourceId=new Ext.form.TextField({
|
var txtSourceId=new Ext.form.TextField({
|
||||||
id: 'AUTH_SOURCE_UID',
|
id: 'AUTH_SOURCE_UID',
|
||||||
fieldLabel: 'krlos',
|
fieldLabel: 'krlos',
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
value:sUID,
|
value: sUID,
|
||||||
width: 200,
|
width: 200,
|
||||||
hideLabel: true,
|
hideLabel: true,
|
||||||
hidden : true,
|
hidden: true
|
||||||
});
|
});
|
||||||
|
|
||||||
var txtName=new Ext.form.TextField({
|
var txtName=new Ext.form.TextField({
|
||||||
id: 'AUTH_SOURCE_NAME',
|
id: 'AUTH_SOURCE_NAME',
|
||||||
fieldLabel: _('ID_NAME'),
|
fieldLabel: _('ID_NAME'),
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
value:'',
|
value:'',
|
||||||
width: 200,
|
width: 200,
|
||||||
@@ -49,8 +49,10 @@ Ext.onReady(function(){
|
|||||||
select: function(c,d,i){
|
select: function(c,d,i){
|
||||||
if(i){
|
if(i){
|
||||||
formAuthSourceE.getForm().findField('AUTH_SOURCE_ATTRIBUTES').setValue('cn' + "\n" + 'samaccountname' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'userprincipalname' + "\n" + 'telephonenumber');
|
formAuthSourceE.getForm().findField('AUTH_SOURCE_ATTRIBUTES').setValue('cn' + "\n" + 'samaccountname' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'userprincipalname' + "\n" + 'telephonenumber');
|
||||||
|
formAuthSourceE.getForm().findField('AUTH_SOURCE_IDENTIFIER_FOR_USER').setValue('samaccountname');
|
||||||
} else {
|
} else {
|
||||||
formAuthSourceE.getForm().findField('AUTH_SOURCE_ATTRIBUTES').setValue('cn' + "\n" + 'uid' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'mail' + "\n" + 'mobile');
|
formAuthSourceE.getForm().findField('AUTH_SOURCE_ATTRIBUTES').setValue('cn' + "\n" + 'uid' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'mail' + "\n" + 'mobile');
|
||||||
|
formAuthSourceE.getForm().findField('AUTH_SOURCE_IDENTIFIER_FOR_USER').setValue('uid');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -188,7 +190,7 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
var txtPassword=new Ext.form.TextField({
|
var txtPassword=new Ext.form.TextField({
|
||||||
id: 'AUTH_SOURCE_PASSWORD',
|
id: 'AUTH_SOURCE_PASSWORD',
|
||||||
fieldLabel: _('ID_CACHE_PASSWORD'),
|
fieldLabel: _('ID_CACHE_PASSWORD'),
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
inputType:'password',
|
inputType:'password',
|
||||||
@@ -205,10 +207,10 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
//Identifier for an imported user
|
//Identifier for an imported user
|
||||||
var txtIdentifier=new Ext.form.TextField({
|
var txtIdentifier=new Ext.form.TextField({
|
||||||
id: 'AS_INDENTIFIER',
|
id: 'AUTH_SOURCE_IDENTIFIER_FOR_USER',
|
||||||
fieldLabel: _('ID_IDENTIFIER_IMPORT_USER'),
|
fieldLabel: _('ID_IDENTIFIER_IMPORT_USER'),
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
value:'uid',
|
value:'',
|
||||||
width: 200,
|
width: 200,
|
||||||
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '50'},
|
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '50'},
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
@@ -221,7 +223,7 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
//Object Classes
|
//Object Classes
|
||||||
var txtaClass=new Ext.form.TextArea({
|
var txtaClass=new Ext.form.TextArea({
|
||||||
id: 'AUTH_SOURCE_OBJECT_CLASSES',
|
id: 'AUTH_SOURCE_OBJECT_CLASSES',
|
||||||
fieldLabel: _('ID_OBJECT_CLASS'),
|
fieldLabel: _('ID_OBJECT_CLASS'),
|
||||||
xtype:'textarea',
|
xtype:'textarea',
|
||||||
value:'*',
|
value:'*',
|
||||||
@@ -236,13 +238,13 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
//Additional Filter
|
//Additional Filter
|
||||||
var txtoAddFilter=new Ext.form.TextField({
|
var txtoAddFilter=new Ext.form.TextField({
|
||||||
id: 'AUTH_SOURCE_ADDITIONAL_FILTER',
|
id: 'AUTH_SOURCE_ADDITIONAL_FILTER',
|
||||||
fieldLabel: _('ID_ADDITIONAL_FILTER'),
|
fieldLabel: _('ID_ADDITIONAL_FILTER'),
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
value:'',
|
value:'',
|
||||||
width: 200,
|
width: 200,
|
||||||
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '200'},
|
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '200'},
|
||||||
allowBlank: false,
|
allowBlank: true,
|
||||||
listeners: {
|
listeners: {
|
||||||
'render': function(c) {
|
'render': function(c) {
|
||||||
c.getEl().on('keyup', function() {
|
c.getEl().on('keyup', function() {
|
||||||
@@ -252,7 +254,7 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
//Attributes
|
//Attributes
|
||||||
var txtAttributes=new Ext.form.TextArea({
|
var txtAttributes=new Ext.form.TextArea({
|
||||||
id: 'AUTH_SOURCE_ATTRIBUTES',
|
id: 'AUTH_SOURCE_ATTRIBUTES',
|
||||||
fieldLabel: _('ID_ATTRIBUTES'),
|
fieldLabel: _('ID_ATTRIBUTES'),
|
||||||
xtype:'textArea',
|
xtype:'textArea',
|
||||||
value:'cn' + "\n" + 'uid' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'mail' + "\n" + 'mobile',
|
value:'cn' + "\n" + 'uid' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'mail' + "\n" + 'mobile',
|
||||||
@@ -375,10 +377,9 @@ function loadAuthSourceData(sUID, txtSearchUser, txtPassword){
|
|||||||
sUID:sUID
|
sUID:sUID
|
||||||
},
|
},
|
||||||
waitMsg: _('ID_UPLOADING_PROCESS_FILE'),
|
waitMsg: _('ID_UPLOADING_PROCESS_FILE'),
|
||||||
success: function(r,o){
|
success: function(r,o){
|
||||||
var data = Ext.util.JSON.decode(r.responseText);
|
var data = Ext.util.JSON.decode(r.responseText);
|
||||||
|
|
||||||
|
|
||||||
if (!data.sources.AUTH_ANONYMOUS){
|
if (!data.sources.AUTH_ANONYMOUS){
|
||||||
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").enable();
|
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").enable();
|
||||||
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").show();
|
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").show();
|
||||||
@@ -395,8 +396,6 @@ function loadAuthSourceData(sUID, txtSearchUser, txtPassword){
|
|||||||
txtPassword.getEl().up('.x-form-item').setDisplayed(false);
|
txtPassword.getEl().up('.x-form-item').setDisplayed(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Ext.getCmp('formAuthSourceE').getForm().setValues({
|
Ext.getCmp('formAuthSourceE').getForm().setValues({
|
||||||
|
|
||||||
AUTH_SOURCE_UID: data.sources.AUTH_SOURCE_UID,
|
AUTH_SOURCE_UID: data.sources.AUTH_SOURCE_UID,
|
||||||
@@ -408,6 +407,7 @@ function loadAuthSourceData(sUID, txtSearchUser, txtPassword){
|
|||||||
AUTH_ANONYMOUS: (data.sources.AUTH_ANONYMOUS)?'yes':'no',
|
AUTH_ANONYMOUS: (data.sources.AUTH_ANONYMOUS)?'yes':'no',
|
||||||
AUTH_SOURCE_SEARCH_USER: data.sources.AUTH_SOURCE_SEARCH_USER,
|
AUTH_SOURCE_SEARCH_USER: data.sources.AUTH_SOURCE_SEARCH_USER,
|
||||||
AUTH_SOURCE_PASSWORD: data.sources.AUTH_SOURCE_PASSWORD,
|
AUTH_SOURCE_PASSWORD: data.sources.AUTH_SOURCE_PASSWORD,
|
||||||
|
AUTH_SOURCE_IDENTIFIER_FOR_USER: data.sources.AUTH_SOURCE_IDENTIFIER_FOR_USER,
|
||||||
AUTH_SOURCE_VERSION: data.sources.AUTH_SOURCE_VERSION,
|
AUTH_SOURCE_VERSION: data.sources.AUTH_SOURCE_VERSION,
|
||||||
AUTH_SOURCE_BASE_DN: data.sources.AUTH_SOURCE_BASE_DN,
|
AUTH_SOURCE_BASE_DN: data.sources.AUTH_SOURCE_BASE_DN,
|
||||||
AUTH_SOURCE_OBJECT_CLASSES: data.sources.AUTH_SOURCE_OBJECT_CLASSES,
|
AUTH_SOURCE_OBJECT_CLASSES: data.sources.AUTH_SOURCE_OBJECT_CLASSES,
|
||||||
@@ -415,11 +415,8 @@ function loadAuthSourceData(sUID, txtSearchUser, txtPassword){
|
|||||||
AUTH_SOURCE_ADDITIONAL_FILTER:data.sources.AUTH_SOURCE_ADDITIONAL_FILTER
|
AUTH_SOURCE_ADDITIONAL_FILTER:data.sources.AUTH_SOURCE_ADDITIONAL_FILTER
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
failure:function(r,o){
|
failure:function(r,o){
|
||||||
//viewport.getEl().unmask();
|
//viewport.getEl().unmask();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ var storeAuthSources = new Ext.data.GroupingStore({
|
|||||||
proxy : new Ext.data.HttpProxy({
|
proxy : new Ext.data.HttpProxy({
|
||||||
url: 'authSources_Ajax?action=authSourcesNew&cmb=yes'
|
url: 'authSources_Ajax?action=authSourcesNew&cmb=yes'
|
||||||
}),
|
}),
|
||||||
reader : new Ext.data.JsonReader( {
|
reader : new Ext.data.JsonReader({
|
||||||
root: 'sources',
|
root: 'sources',
|
||||||
fields: [
|
fields: [
|
||||||
{name: 'sType'},
|
{name: 'sType'},
|
||||||
@@ -23,12 +23,12 @@ var my_values = [
|
|||||||
['krlos']
|
['krlos']
|
||||||
];
|
];
|
||||||
var cboxAuthSourse = new Ext.form.ComboBox({
|
var cboxAuthSourse = new Ext.form.ComboBox({
|
||||||
fieldLabel: 'Provider',
|
fieldLabel: 'Provider',
|
||||||
hiddenName: 'AUTH_SOURCE_PROVIDER',
|
hiddenName: 'AUTH_SOURCE_PROVIDER',
|
||||||
mode: 'local',
|
mode: 'local',
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
store: storeAuthSources,
|
store: storeAuthSources,
|
||||||
valueField : 'sType',
|
valueField: 'sType',
|
||||||
displayField: 'sLabel',
|
displayField: 'sLabel',
|
||||||
emptyText: 'Choose an option...',
|
emptyText: 'Choose an option...',
|
||||||
width: 160,
|
width: 160,
|
||||||
@@ -42,41 +42,40 @@ var cboxAuthSourse = new Ext.form.ComboBox({
|
|||||||
});
|
});
|
||||||
|
|
||||||
componAuthSourse = new Ext.form.FieldSet({
|
componAuthSourse = new Ext.form.FieldSet({
|
||||||
title: 'Available Authentication Sources',
|
title: 'Available Authentication Sources',
|
||||||
items: [
|
items: [
|
||||||
cboxAuthSourse
|
cboxAuthSourse
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
formAuthSourceOptoins = new Ext.FormPanel({
|
formAuthSourceOptoins = new Ext.FormPanel({
|
||||||
id:'formAuthSourceOptoins',
|
id:'formAuthSourceOptoins',
|
||||||
labelWidth: 250,
|
labelWidth: 250,
|
||||||
labelAlign:'right',
|
labelAlign: 'right',
|
||||||
autoScroll: true,
|
autoScroll: true,
|
||||||
fileUpload: true,
|
fileUpload: true,
|
||||||
width:800,
|
width:800,
|
||||||
bodyStyle:'padding:10px',
|
bodyStyle:'padding:10px',
|
||||||
waitMsgTarget : true,
|
waitMsgTarget: true,
|
||||||
frame: true,
|
frame: true,
|
||||||
defaults: {
|
defaults: {
|
||||||
anchor: '100%',
|
anchor: '100%',
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
resizable: true,
|
resizable: true,
|
||||||
msgTarget: 'side',
|
msgTarget: 'side',
|
||||||
align:'center'
|
align:'center'
|
||||||
},
|
},
|
||||||
items:[
|
items:[
|
||||||
componAuthSourse,
|
componAuthSourse
|
||||||
],
|
],
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: 'Continue',
|
text: 'Continue',
|
||||||
handler: gotypesAuthSources
|
handler: gotypesAuthSources
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
text: 'Cancel',
|
text: 'Cancel',
|
||||||
handler: goBackform
|
handler: goBackform
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -125,9 +124,4 @@ var cboxAuthSourse = new Ext.form.ComboBox({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -5,32 +5,31 @@
|
|||||||
|
|
||||||
Ext.onReady(function(){
|
Ext.onReady(function(){
|
||||||
|
|
||||||
|
|
||||||
var txtSourceId=new Ext.form.TextField({
|
var txtSourceId=new Ext.form.TextField({
|
||||||
id: 'AUTH_SOURCE_UID',
|
id: 'AUTH_SOURCE_UID',
|
||||||
fieldLabel: 'krlos',
|
fieldLabel: 'krlos',
|
||||||
xtype:'textfield',
|
xtype: 'textfield',
|
||||||
value:'',
|
value: '',
|
||||||
width: 200,
|
width: 200,
|
||||||
hideLabel: true,
|
hideLabel: true,
|
||||||
hidden : true,
|
hidden: true
|
||||||
});
|
});
|
||||||
|
|
||||||
var txtSourceProvider=new Ext.form.TextField({
|
var txtSourceProvider=new Ext.form.TextField({
|
||||||
id: 'AUTH_SOURCE_PROVIDER',
|
id: 'AUTH_SOURCE_PROVIDER',
|
||||||
fieldLabel: 'krlos',
|
fieldLabel: 'krlos',
|
||||||
xtype:'textfield',
|
xtype: 'textfield',
|
||||||
value:sprovider,
|
value: sprovider,
|
||||||
width: 200,
|
width: 200,
|
||||||
hideLabel: true,
|
hideLabel: true,
|
||||||
hidden : true,
|
hidden: true
|
||||||
});
|
});
|
||||||
|
|
||||||
var txtName=new Ext.form.TextField({
|
var txtName=new Ext.form.TextField({
|
||||||
id: 'AUTH_SOURCE_NAME',
|
id: 'AUTH_SOURCE_NAME',
|
||||||
fieldLabel: _('ID_NAME'),
|
fieldLabel: _('ID_NAME'),
|
||||||
xtype:'textfield',
|
xtype: 'textfield',
|
||||||
value:'',
|
value: '',
|
||||||
width: 200,
|
width: 200,
|
||||||
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '50'},
|
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '50'},
|
||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
@@ -60,15 +59,17 @@ Ext.onReady(function(){
|
|||||||
select: function(c,d,i){
|
select: function(c,d,i){
|
||||||
if(i){
|
if(i){
|
||||||
formAuthSource.getForm().findField('AUTH_SOURCE_ATTRIBUTES').setValue('cn' + "\n" + 'samaccountname' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'userprincipalname' + "\n" + 'telephonenumber');
|
formAuthSource.getForm().findField('AUTH_SOURCE_ATTRIBUTES').setValue('cn' + "\n" + 'samaccountname' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'userprincipalname' + "\n" + 'telephonenumber');
|
||||||
|
formAuthSource.getForm().findField('AUTH_SOURCE_IDENTIFIER_FOR_USER').setValue('samaccountname');
|
||||||
} else {
|
} else {
|
||||||
formAuthSource.getForm().findField('AUTH_SOURCE_ATTRIBUTES').setValue('cn' + "\n" + 'uid' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'mail' + "\n" + 'mobile');
|
formAuthSource.getForm().findField('AUTH_SOURCE_ATTRIBUTES').setValue('cn' + "\n" + 'uid' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'mail' + "\n" + 'mobile');
|
||||||
|
formAuthSource.getForm().findField('AUTH_SOURCE_IDENTIFIER_FOR_USER').setValue('uid');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var txtServerName=new Ext.form.TextField({
|
var txtServerName=new Ext.form.TextField({
|
||||||
id: 'AUTH_SOURCE_SERVER_NAME',
|
id: 'AUTH_SOURCE_SERVER_NAME',
|
||||||
fieldLabel: _('ID_SERVER_NAME'),
|
fieldLabel: _('ID_SERVER_NAME'),
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
value:'',
|
value:'',
|
||||||
@@ -84,7 +85,7 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
var txtPort=new Ext.form.TextField({
|
var txtPort=new Ext.form.TextField({
|
||||||
id: 'AUTH_SOURCE_PORT',
|
id: 'AUTH_SOURCE_PORT',
|
||||||
fieldLabel: _('ID_PORT'),
|
fieldLabel: _('ID_PORT'),
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
value:'389',
|
value:'389',
|
||||||
@@ -107,12 +108,14 @@ Ext.onReady(function(){
|
|||||||
data : my_valuesTLS
|
data : my_valuesTLS
|
||||||
}),
|
}),
|
||||||
displayField: 'no',
|
displayField: 'no',
|
||||||
|
allowBlank: false,
|
||||||
typeAhead: true,
|
typeAhead: true,
|
||||||
mode: 'local',
|
mode: 'local',
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
emptyText:'Choose an option...',
|
emptyText:'Choose an option...',
|
||||||
selectOnFocus:true
|
selectOnFocus:true
|
||||||
});
|
});
|
||||||
|
//cboxTLS.setValue('no');
|
||||||
|
|
||||||
var my_values_version= [['2'],['3']];
|
var my_values_version= [['2'],['3']];
|
||||||
var cboxVersion = new Ext.form.ComboBox({
|
var cboxVersion = new Ext.form.ComboBox({
|
||||||
@@ -122,6 +125,7 @@ Ext.onReady(function(){
|
|||||||
fields: ['two','three'],
|
fields: ['two','three'],
|
||||||
data : my_values_version
|
data : my_values_version
|
||||||
}),
|
}),
|
||||||
|
allowBlank: false,
|
||||||
displayField: 'two',
|
displayField: 'two',
|
||||||
typeAhead: true,
|
typeAhead: true,
|
||||||
mode: 'local',
|
mode: 'local',
|
||||||
@@ -132,8 +136,8 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
|
|
||||||
var txtBaseDN=new Ext.form.TextField({
|
var txtBaseDN=new Ext.form.TextField({
|
||||||
id: 'AUTH_SOURCE_BASE_DN',
|
id: 'AUTH_SOURCE_BASE_DN',
|
||||||
fieldLabel: _('ID_BASE_DN'),
|
fieldLabel: _('ID_BASE_DN'),
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
value:'',
|
value:'',
|
||||||
width: 200,
|
width: 200,
|
||||||
@@ -158,6 +162,7 @@ Ext.onReady(function(){
|
|||||||
displayField: '0',
|
displayField: '0',
|
||||||
typeAhead: true,
|
typeAhead: true,
|
||||||
mode: 'local',
|
mode: 'local',
|
||||||
|
allowBlank: false,
|
||||||
triggerAction: 'all',
|
triggerAction: 'all',
|
||||||
emptyText:'Choose an option...',
|
emptyText:'Choose an option...',
|
||||||
selectOnFocus:true,
|
selectOnFocus:true,
|
||||||
@@ -177,14 +182,14 @@ Ext.onReady(function(){
|
|||||||
txtSearchUser.getEl().up('.x-form-item').setDisplayed(false);
|
txtSearchUser.getEl().up('.x-form-item').setDisplayed(false);
|
||||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").disable();
|
Ext.getCmp("AUTH_SOURCE_PASSWORD").disable();
|
||||||
Ext.getCmp("AUTH_SOURCE_PASSWORD").hide();
|
Ext.getCmp("AUTH_SOURCE_PASSWORD").hide();
|
||||||
txtPassword.getEl().up('.x-form-item').setDisplayed(false);
|
txtPassword.getEl().up('.x-form-item').setDisplayed(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var txtSearchUser=new Ext.form.TextField({
|
var txtSearchUser=new Ext.form.TextField({
|
||||||
id: 'AUTH_SOURCE_SEARCH_USER',
|
id: 'AUTH_SOURCE_SEARCH_USER',
|
||||||
fieldLabel: _('ID_SEARCH_USER'),
|
fieldLabel: _('ID_SEARCH_USER'),
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
value:'',
|
value:'',
|
||||||
@@ -199,7 +204,7 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
|
|
||||||
var txtPassword=new Ext.form.TextField({
|
var txtPassword=new Ext.form.TextField({
|
||||||
id: 'AUTH_SOURCE_PASSWORD',
|
id: 'AUTH_SOURCE_PASSWORD',
|
||||||
fieldLabel: _('ID_CACHE_PASSWORD'),
|
fieldLabel: _('ID_CACHE_PASSWORD'),
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
inputType:'password',
|
inputType:'password',
|
||||||
@@ -216,7 +221,7 @@ Ext.onReady(function(){
|
|||||||
|
|
||||||
//Identifier for an imported user
|
//Identifier for an imported user
|
||||||
var txtIdentifier=new Ext.form.TextField({
|
var txtIdentifier=new Ext.form.TextField({
|
||||||
id: 'AS_INDENTIFIER',
|
id: 'AUTH_SOURCE_IDENTIFIER_FOR_USER',
|
||||||
fieldLabel: _('ID_IDENTIFIER_IMPORT_USER'),
|
fieldLabel: _('ID_IDENTIFIER_IMPORT_USER'),
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
value:'uid',
|
value:'uid',
|
||||||
@@ -232,7 +237,7 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
//Object Classes
|
//Object Classes
|
||||||
var txtaClass=new Ext.form.TextArea({
|
var txtaClass=new Ext.form.TextArea({
|
||||||
id: 'AUTH_SOURCE_OBJECT_CLASSES',
|
id: 'AUTH_SOURCE_OBJECT_CLASSES',
|
||||||
fieldLabel: _('ID_OBJECT_CLASS'),
|
fieldLabel: _('ID_OBJECT_CLASS'),
|
||||||
xtype:'textarea',
|
xtype:'textarea',
|
||||||
value:'*',
|
value:'*',
|
||||||
@@ -247,13 +252,13 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
//Additional Filter
|
//Additional Filter
|
||||||
var txtoAddFilter=new Ext.form.TextField({
|
var txtoAddFilter=new Ext.form.TextField({
|
||||||
id: 'AUTH_SOURCE_ADDITIONAL_FILTER',
|
id: 'AUTH_SOURCE_ADDITIONAL_FILTER',
|
||||||
fieldLabel: _('ID_ADDITIONAL_FILTER'),
|
fieldLabel: _('ID_ADDITIONAL_FILTER'),
|
||||||
xtype:'textfield',
|
xtype:'textfield',
|
||||||
value:'',
|
value:'',
|
||||||
width: 200,
|
width: 200,
|
||||||
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '200'},
|
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '200'},
|
||||||
allowBlank: false,
|
allowBlank: true,
|
||||||
listeners: {
|
listeners: {
|
||||||
'render': function(c) {
|
'render': function(c) {
|
||||||
c.getEl().on('keyup', function() {
|
c.getEl().on('keyup', function() {
|
||||||
@@ -263,7 +268,7 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
//Attributes
|
//Attributes
|
||||||
var txtAttributes=new Ext.form.TextArea({
|
var txtAttributes=new Ext.form.TextArea({
|
||||||
id: 'AUTH_SOURCE_ATTRIBUTES',
|
id: 'AUTH_SOURCE_ATTRIBUTES',
|
||||||
fieldLabel: _('ID_ATTRIBUTES'),
|
fieldLabel: _('ID_ATTRIBUTES'),
|
||||||
xtype:'textArea',
|
xtype:'textArea',
|
||||||
value:'cn' + "\n" + 'uid' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'mail' + "\n" + 'mobile',
|
value:'cn' + "\n" + 'uid' + "\n" + 'givenname' + "\n" + 'sn' + "\n" + 'mail' + "\n" + 'mobile',
|
||||||
@@ -278,13 +283,13 @@ Ext.onReady(function(){
|
|||||||
});
|
});
|
||||||
//here we are setting the fields
|
//here we are setting the fields
|
||||||
fieldsAS = new Ext.form.FieldSet({
|
fieldsAS = new Ext.form.FieldSet({
|
||||||
title: 'Authentication Source Information',
|
title: 'Authentication Source Information',
|
||||||
items: [
|
items: [
|
||||||
txtSourceId,
|
txtSourceId,
|
||||||
txtSourceProvider,
|
txtSourceProvider,
|
||||||
txtName,
|
txtName,
|
||||||
cboxType,
|
cboxType,
|
||||||
txtServerName,
|
txtServerName,
|
||||||
txtPort,
|
txtPort,
|
||||||
cboxTLS,
|
cboxTLS,
|
||||||
cboxVersion,
|
cboxVersion,
|
||||||
@@ -296,12 +301,12 @@ Ext.onReady(function(){
|
|||||||
txtaClass,
|
txtaClass,
|
||||||
txtoAddFilter,
|
txtoAddFilter,
|
||||||
txtAttributes
|
txtAttributes
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
formAuthSource = new Ext.FormPanel({
|
formAuthSource = new Ext.FormPanel({
|
||||||
id:'formAuthSource',
|
id:'formAuthSource',
|
||||||
labelWidth: 250,
|
labelWidth: 250,
|
||||||
labelAlign:'right',
|
labelAlign:'right',
|
||||||
autoScroll: true,
|
autoScroll: true,
|
||||||
@@ -315,7 +320,7 @@ Ext.onReady(function(){
|
|||||||
allowBlank: false,
|
allowBlank: false,
|
||||||
resizable: true,
|
resizable: true,
|
||||||
msgTarget: 'side',
|
msgTarget: 'side',
|
||||||
align:'center'
|
align:'center'
|
||||||
},
|
},
|
||||||
items:[
|
items:[
|
||||||
fieldsAS
|
fieldsAS
|
||||||
@@ -323,7 +328,7 @@ Ext.onReady(function(){
|
|||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
text: 'Save',
|
text: 'Save',
|
||||||
handler: TestSite
|
handler: TestSite
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -381,6 +386,4 @@ Ext.onReady(function(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user