mail attribute name added

This commit is contained in:
Thorsten Ludewig
2011-01-10 12:05:00 +01:00
parent e80d419aaf
commit 8c17550ccf
2 changed files with 73 additions and 35 deletions

View File

@@ -107,6 +107,17 @@ public class LDAPConfig
return attributeNameId;
}
/**
* Method description
*
*
* @return
*/
public String getAttributeNameMail()
{
return attributeNameMail;
}
/**
* Method description
*
@@ -292,6 +303,10 @@ public class LDAPConfig
@XmlElement(name = "attribute-name-id")
private String attributeNameId = "uid";
/** Field description */
@XmlElement(name = "attribute-name-mail")
private String attributeNameMail = "mail";
/** Field description */
@XmlElement(name = "base-dn")
private String baseDn = "dc=scm-manager,dc=org";

View File

@@ -30,39 +30,62 @@
*/
function sayHello(){
Ext.Ajax.request({
url: restUrl + 'hello',
method: 'GET',
disableCaching: true,
success: function(response){
var msg = response.responseText;
Ext.MessageBox.show({
title: 'Hello Message',
msg: msg,
buttons: Ext.MessageBox.OK,
icon: Ext.MessageBox.INFO
});
},
failure: function(){
Ext.MessageBox.show({
title: 'Error',
msg: 'Could not display the hello message',
buttons: Ext.MessageBox.OK,
icon: Ext.MessageBox.ERROR
});
}
});
}
loginCallbacks.push(function(){
var navPanel = Ext.getCmp('navigationPanel');
var count = navPanel.count() - 1;
navPanel.insertSection(count, {
title: 'Hello World',
items: [{
label: 'Say Hello',
fn: sayHello
}]
});
});
registerGeneralConfigPanel({
xtype : 'configForm',
title : 'PAM Authentication',
items : [{
xtype : 'textfield',
fieldLabel : 'Service name',
name : 'service-name',
allowBlank : false
},{
xtype : 'textfield',
fieldLabel : 'Admin Groups',
name : 'admin-groups',
allowBlank : true
},{
xtype : 'textfield',
fieldLabel : 'Admin Users',
name : 'admin-users',
allowBlank : true
}],
onSubmit: function(values){
this.el.mask('Submit ...');
Ext.Ajax.request({
url: restUrl + 'config/auth/ldap.json',
method: 'POST',
jsonData: values,
scope: this,
disableCaching: true,
success: function(response){
this.el.unmask();
},
failure: function(){
this.el.unmask();
}
});
},
onLoad: function(el){
var tid = setTimeout( function(){ el.mask('Loading ...'); }, 100);
Ext.Ajax.request({
url: restUrl + 'config/auth/ldap.json',
method: 'GET',
scope: this,
disableCaching: true,
success: function(response){
var obj = Ext.decode(response.responseText);
this.load(obj);
clearTimeout(tid);
el.unmask();
},
failure: function(){
el.unmask();
clearTimeout(tid);
alert('failure');
}
});
}
});