The username creates created from the auto_register method's call to

user.login = transform_username(username)

That internally calls LDAPConfigurator.transform_username(username)

Which is
username.gsub(".", "-")

Shouldn't the user.login be set via...

user.login = build_username(username)

instead?



On Tuesday, November 27, 2012 1:19:37 PM UTC-8, Walter Boring wrote:
>
> ok I tried to set the distinguished_name_template as you described, but it 
> didn't change anything.
> The login member in the user object is still set to "walter-boring@hp-com" 
> prior to calling save!  which fails the validation.
>
> Walt
>
> On Tuesday, November 20, 2012 7:51:03 AM UTC-8, Ken Dreyer wrote:
>>
>> On Mon, Nov 19, 2012 at 11:19 AM, Walter Boring <wabo...@hemna.com> 
>> wrote: 
>> > This is the user record just prior to calling user.save 
>> > #<User id: nil, login: "walter-boring@hp-com", email: 
>> > "walter...@hp.com", crypted_password: nil, salt: nil, created_at: nil, 
>>
>> Unfortunately "@" signs are not currently supported in usernames. You 
>> should set "hp.com" within the distinguished_name_template in the 
>> authentication section of gitorious.yml 
>>
>> distinguished_name_template: "{}@hp.com" 
>>
>> So your Gitorious username is just "walter-boring". 
>>
>> That said, I would be happy to test patches to make Gitorious support 
>> "@" signs in usernames :) Ideally this would allow us to support 
>> multi-realm authentication. 
>>
>> - Ken 
>>
>

-- 
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com

Reply via email to