Skip to content
Snippets Groups Projects
Commit a16b75c3 authored by gnaegi's avatar gnaegi
Browse files

OO-2089 remove configurability of username configuration, always user identity name

parent d37c474d
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,6 @@ import java.util.Collections;
import java.util.Locale;
import java.util.Map;
import org.olat.basesecurity.BaseSecurityManager;
import org.olat.core.gui.components.form.ValidationError;
import org.olat.core.gui.components.form.flexible.FormItem;
import org.olat.core.gui.components.form.flexible.FormItemContainer;
......@@ -47,16 +46,7 @@ import org.olat.user.UserImpl;
* @author gnaegi, http://www.frentix.com
*/
public class UserNameReadOnlyPropertyHandler extends AbstractUserPropertyHandler {
private String authProvider;
/**
* Spring setter for the authentication provider
* @param authProvider
*/
public void setAuthProvider(String authProvider) {
this.authProvider = authProvider;
}
@Override
public FormItem addFormItem(Locale locale, User user,
String usageIdentifyer, boolean isAdministrativeUser,
......@@ -86,7 +76,7 @@ public class UserNameReadOnlyPropertyHandler extends AbstractUserPropertyHandler
protected String getInternalValue(User user) {
if (user instanceof UserImpl) {
Identity identity = ((UserImpl)user).getIdentity();
return BaseSecurityManager.getInstance().findAuthenticationName(identity, authProvider);
return identity.getName();
}
return "";
}
......
......@@ -13,7 +13,6 @@
<property name="name" value="userName" />
<property name="group" value="account" />
<property name="deletable" value="false" />
<property name="authProvider" value="OLAT" /> <!-- could also be ldap, shibboleth, webdav, cal etc -->
</bean>
<bean id="userPropertyFirstName" class="org.olat.user.propertyhandlers.Generic127CharTextPropertyHandler">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment