mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-07 04:40:53 +01:00
mail attribute name added
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user