diff --git a/plugins/scm-auth-ldap-plugin/src/main/java/sonia/scm/auth/ldap/LDAPAuthenticationHandler.java b/plugins/scm-auth-ldap-plugin/src/main/java/sonia/scm/auth/ldap/LDAPAuthenticationHandler.java index 8ad504cae9..d4823f4e7b 100644 --- a/plugins/scm-auth-ldap-plugin/src/main/java/sonia/scm/auth/ldap/LDAPAuthenticationHandler.java +++ b/plugins/scm-auth-ldap-plugin/src/main/java/sonia/scm/auth/ldap/LDAPAuthenticationHandler.java @@ -214,10 +214,6 @@ public class LDAPAuthenticationHandler implements AuthenticationHandler // read dynamic group attribute getGroups(userAttributes, groups); - // set admin - user.setAdmin(isAdmin(user.getName(), groups)); - - // TODO: nsrole dn - admin role result = new AuthenticationResult(user, groups); } catch (NamingException ex) @@ -409,39 +405,6 @@ public class LDAPAuthenticationHandler implements AuthenticationHandler } } - /** - * Method description - * - * - * @param userName - * @param groups - * - * @return - */ - private boolean isAdmin(String userName, Set groups) - { - boolean admin = false; - - if (config.getAdminUserSet().contains(userName)) - { - admin = true; - } - else - { - for (String group : groups) - { - if (config.getAdminGroupSet().contains(group)) - { - admin = true; - - break; - } - } - } - - return admin; - } - //~--- fields --------------------------------------------------------------- /** Field description */ diff --git a/plugins/scm-auth-ldap-plugin/src/main/java/sonia/scm/auth/ldap/LDAPConfig.java b/plugins/scm-auth-ldap-plugin/src/main/java/sonia/scm/auth/ldap/LDAPConfig.java index 1ddf1c7900..45dd07ea8f 100644 --- a/plugins/scm-auth-ldap-plugin/src/main/java/sonia/scm/auth/ldap/LDAPConfig.java +++ b/plugins/scm-auth-ldap-plugin/src/main/java/sonia/scm/auth/ldap/LDAPConfig.java @@ -52,39 +52,6 @@ import javax.xml.bind.annotation.XmlRootElement; public class LDAPConfig { - /** - * Method description - * - * - * @return - */ - public String getAdminGroups() - { - return adminGroups; - } - - /** - * Method description - * - * - * @return - */ - public String getAdminNsroleDn() - { - return adminNsroleDn; - } - - /** - * Method description - * - * - * @return - */ - public String getAdminUsers() - { - return adminUsers; - } - /** * Method description * @@ -210,56 +177,6 @@ public class LDAPConfig return unitPeople; } - //~--- set methods ---------------------------------------------------------- - - /** - * Method description - * - * - * - * @param adminGroups - */ - public void setAdminGroups(String adminGroups) - { - this.adminGroups = adminGroups; - } - - /** - * Method description - * - * - * - * @param adminUsers - */ - public void setAdminUsers(String adminUsers) - { - this.adminUsers = adminUsers; - } - - //~--- get methods ---------------------------------------------------------- - - /** - * Method description - * - * - * @return - */ - Set getAdminGroupSet() - { - return split(adminGroups); - } - - /** - * Method description - * - * - * @return - */ - Set getAdminUserSet() - { - return split(adminUsers); - } - //~--- methods -------------------------------------------------------------- /** @@ -287,18 +204,6 @@ public class LDAPConfig //~--- fields --------------------------------------------------------------- - /** Field description */ - @XmlElement(name = "admin-groups") - private String adminGroups = "scm-admin,dev-admin"; - - /** Field description */ - @XmlElement(name = "admin-nsrole-dn") - private String adminNsroleDn = "cn=scm-admins-role,dc=scm-manager,dc=org"; - - /** Field description */ - @XmlElement(name = "admin-users") - private String adminUsers = "admin,root"; - /** Field description */ @XmlElement(name = "attribute-name-fullname") private String attributeNameFullname = "cn"; diff --git a/plugins/scm-auth-ldap-plugin/src/main/resources/sonia/scm/auth/ldap/sonia.ldap.js b/plugins/scm-auth-ldap-plugin/src/main/resources/sonia/scm/auth/ldap/sonia.ldap.js index b8c6ba633d..18af70ad7f 100644 --- a/plugins/scm-auth-ldap-plugin/src/main/resources/sonia/scm/auth/ldap/sonia.ldap.js +++ b/plugins/scm-auth-ldap-plugin/src/main/resources/sonia/scm/auth/ldap/sonia.ldap.js @@ -35,23 +35,6 @@ registerGeneralConfigPanel({ xtype : 'configForm', title : 'LDAP Authentication', items : [{ - xtype : 'textfield', - fieldLabel : 'Admin NSRole DN', - name : 'admin-nsrole-dn', - allowBlank : true - },{ - xtype : 'textfield', - fieldLabel : 'Admin Groups', - name : 'admin-groups', - allowBlank : true - } - ,{ - xtype : 'textfield', - fieldLabel : 'Admin Users', - name : 'admin-users', - allowBlank : true - } - ,{ xtype : 'textfield', fieldLabel : 'Fullname Attribute Name', name : 'attribute-name-fullname',