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 ) );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* verification the register automatic
|
||||
*
|
||||
@@ -889,7 +888,6 @@ class RBAC
|
||||
function getAuthenticationSources($start,$limit,$filter='') {
|
||||
return $this->authSourcesObj->getAuthenticationSources($start,$limit,$filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* this function gets all authentication source
|
||||
* Authentication Sources
|
||||
@@ -900,9 +898,16 @@ class RBAC
|
||||
* @return $this->authSourcesObj->load
|
||||
*/
|
||||
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
|
||||
* Authentication Sources
|
||||
@@ -913,6 +918,7 @@ class RBAC
|
||||
* @return $this->authSourcesObj->create
|
||||
*/
|
||||
function createAuthSource($aData) {
|
||||
$aData['AUTH_SOURCE_PASSWORD'] = G::encrypt($aData['AUTH_SOURCE_PASSWORD'],$aData['AUTH_SOURCE_SERVER_NAME'])."_2NnV3ujj3w";
|
||||
$this->authSourcesObj->create($aData);
|
||||
}
|
||||
|
||||
@@ -927,6 +933,7 @@ class RBAC
|
||||
* @return $this->authSourcesObj->create
|
||||
*/
|
||||
function updateAuthSource($aData) {
|
||||
$aData['AUTH_SOURCE_PASSWORD'] = G::encrypt($aData['AUTH_SOURCE_PASSWORD'],$aData['AUTH_SOURCE_SERVER_NAME'])."_2NnV3ujj3w";
|
||||
$this->authSourcesObj->update($aData);
|
||||
}
|
||||
|
||||
|
||||
@@ -118,6 +118,12 @@ class LDAP
|
||||
$sKeyword = trim($sKeyword);
|
||||
$RBAC = RBAC::getSingleton();
|
||||
$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']);
|
||||
@ldap_set_option($oLink, LDAP_OPT_PROTOCOL_VERSION, $aAuthSource['AUTH_SOURCE_VERSION']);
|
||||
@ldap_set_option($oLink, LDAP_OPT_REFERRALS, 0);
|
||||
|
||||
@@ -12,7 +12,7 @@ Ext.onReady(function(){
|
||||
value: sUID,
|
||||
width: 200,
|
||||
hideLabel: true,
|
||||
hidden : true,
|
||||
hidden: true
|
||||
});
|
||||
|
||||
var txtName=new Ext.form.TextField({
|
||||
@@ -49,8 +49,10 @@ Ext.onReady(function(){
|
||||
select: function(c,d,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_IDENTIFIER_FOR_USER').setValue('samaccountname');
|
||||
} else {
|
||||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -205,10 +207,10 @@ Ext.onReady(function(){
|
||||
|
||||
//Identifier for an imported user
|
||||
var txtIdentifier=new Ext.form.TextField({
|
||||
id: 'AS_INDENTIFIER',
|
||||
id: 'AUTH_SOURCE_IDENTIFIER_FOR_USER',
|
||||
fieldLabel: _('ID_IDENTIFIER_IMPORT_USER'),
|
||||
xtype:'textfield',
|
||||
value:'uid',
|
||||
value:'',
|
||||
width: 200,
|
||||
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '50'},
|
||||
allowBlank: false,
|
||||
@@ -242,7 +244,7 @@ Ext.onReady(function(){
|
||||
value:'',
|
||||
width: 200,
|
||||
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '200'},
|
||||
allowBlank: false,
|
||||
allowBlank: true,
|
||||
listeners: {
|
||||
'render': function(c) {
|
||||
c.getEl().on('keyup', function() {
|
||||
@@ -378,7 +380,6 @@ function loadAuthSourceData(sUID, txtSearchUser, txtPassword){
|
||||
success: function(r,o){
|
||||
var data = Ext.util.JSON.decode(r.responseText);
|
||||
|
||||
|
||||
if (!data.sources.AUTH_ANONYMOUS){
|
||||
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").enable();
|
||||
Ext.getCmp("AUTH_SOURCE_SEARCH_USER").show();
|
||||
@@ -395,8 +396,6 @@ function loadAuthSourceData(sUID, txtSearchUser, txtPassword){
|
||||
txtPassword.getEl().up('.x-form-item').setDisplayed(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Ext.getCmp('formAuthSourceE').getForm().setValues({
|
||||
|
||||
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_SOURCE_SEARCH_USER: data.sources.AUTH_SOURCE_SEARCH_USER,
|
||||
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_BASE_DN: data.sources.AUTH_SOURCE_BASE_DN,
|
||||
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
|
||||
})
|
||||
},
|
||||
|
||||
failure:function(r,o){
|
||||
//viewport.getEl().unmask();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,6 @@ var cboxAuthSourse = new Ext.form.ComboBox({
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
formAuthSourceOptoins = new Ext.FormPanel({
|
||||
id:'formAuthSourceOptoins',
|
||||
labelWidth: 250,
|
||||
@@ -67,7 +66,7 @@ var cboxAuthSourse = new Ext.form.ComboBox({
|
||||
align:'center'
|
||||
},
|
||||
items:[
|
||||
componAuthSourse,
|
||||
componAuthSourse
|
||||
],
|
||||
buttons: [
|
||||
{
|
||||
@@ -126,8 +125,3 @@ var cboxAuthSourse = new Ext.form.ComboBox({
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
Ext.onReady(function(){
|
||||
|
||||
|
||||
var txtSourceId=new Ext.form.TextField({
|
||||
id: 'AUTH_SOURCE_UID',
|
||||
fieldLabel: 'krlos',
|
||||
@@ -13,7 +12,7 @@ Ext.onReady(function(){
|
||||
value: '',
|
||||
width: 200,
|
||||
hideLabel: true,
|
||||
hidden : true,
|
||||
hidden: true
|
||||
});
|
||||
|
||||
var txtSourceProvider=new Ext.form.TextField({
|
||||
@@ -23,7 +22,7 @@ Ext.onReady(function(){
|
||||
value: sprovider,
|
||||
width: 200,
|
||||
hideLabel: true,
|
||||
hidden : true,
|
||||
hidden: true
|
||||
});
|
||||
|
||||
var txtName=new Ext.form.TextField({
|
||||
@@ -60,8 +59,10 @@ Ext.onReady(function(){
|
||||
select: function(c,d,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_IDENTIFIER_FOR_USER').setValue('samaccountname');
|
||||
} else {
|
||||
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');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -107,12 +108,14 @@ Ext.onReady(function(){
|
||||
data : my_valuesTLS
|
||||
}),
|
||||
displayField: 'no',
|
||||
allowBlank: false,
|
||||
typeAhead: true,
|
||||
mode: 'local',
|
||||
triggerAction: 'all',
|
||||
emptyText:'Choose an option...',
|
||||
selectOnFocus:true
|
||||
});
|
||||
//cboxTLS.setValue('no');
|
||||
|
||||
var my_values_version= [['2'],['3']];
|
||||
var cboxVersion = new Ext.form.ComboBox({
|
||||
@@ -122,6 +125,7 @@ Ext.onReady(function(){
|
||||
fields: ['two','three'],
|
||||
data : my_values_version
|
||||
}),
|
||||
allowBlank: false,
|
||||
displayField: 'two',
|
||||
typeAhead: true,
|
||||
mode: 'local',
|
||||
@@ -158,6 +162,7 @@ Ext.onReady(function(){
|
||||
displayField: '0',
|
||||
typeAhead: true,
|
||||
mode: 'local',
|
||||
allowBlank: false,
|
||||
triggerAction: 'all',
|
||||
emptyText:'Choose an option...',
|
||||
selectOnFocus:true,
|
||||
@@ -216,7 +221,7 @@ Ext.onReady(function(){
|
||||
|
||||
//Identifier for an imported user
|
||||
var txtIdentifier=new Ext.form.TextField({
|
||||
id: 'AS_INDENTIFIER',
|
||||
id: 'AUTH_SOURCE_IDENTIFIER_FOR_USER',
|
||||
fieldLabel: _('ID_IDENTIFIER_IMPORT_USER'),
|
||||
xtype:'textfield',
|
||||
value:'uid',
|
||||
@@ -253,7 +258,7 @@ Ext.onReady(function(){
|
||||
value:'',
|
||||
width: 200,
|
||||
autoCreate: {tag: 'input', type: 'text', size: '20', autocomplete: 'off', maxlength: '200'},
|
||||
allowBlank: false,
|
||||
allowBlank: true,
|
||||
listeners: {
|
||||
'render': function(c) {
|
||||
c.getEl().on('keyup', function() {
|
||||
@@ -382,5 +387,3 @@ Ext.onReady(function(){
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user