I believe these instructions need to be updated to instruct using the script/create_admin script.

Anyway, here is the relevant part in app/models/user.rb:

# For new users we are a little more strict than for existing ones.
USERNAME_FORMAT = /[a-z0-9\-_\.]+/i.freeze
USERNAME_FORMAT_ON_CREATE = /[a-z0-9\-]+/.freeze
...
validates_format_of :login, :with => /^#{USERNAME_FORMAT_ON_CREATE}$/i, :on => :create validates_format_of :login, :with => /^#{USERNAME_FORMAT}$/i, :on => :update

It is not explained the reason why the rules are different for new and existent users, but I guess the original format was USERNAME_FORMAT, which allowed underscore (_) and dots (.). Then, for some unknown reason to me, it has probably changed for not allowing dots and underscore anymore, probably for easing routes generation. The different rules are probably explained because there was no obvious thing to do with current users.

That is why you can use dots and underscore in existent users but not for new users. We should think in some better solution for this anyway...

Not sure how to proceed yet :)

Best regards,

Rodrigo.

Em 15-05-2011 18:42, William Ghelfi escreveu:

I followed this guide: http://cjohansen.no/en/ruby/setting_up_gitorious_on_your_own_server

And specified user.login=w.trumbitta in the create admin script, as showed in the guide

:)

Wiz

Il giorno 15/mag/2011 23:34, "Rodrigo Rosenfeld Rosas" <rr.ro...@gmail.com <mailto:rr.ro...@gmail.com>> ha scritto:
> I still don't understand. Are you talking about script/create_admin? If
> so, the scripts only asks for e-mail and password and not about the login.
>
> How exactly did you get your login with a dot in it? Did you do that
> directly in database, through SQL or some tool?
>
> Em 14-05-2011 14:39, William Ghelfi escreveu:
>>
>> Hi,
>> It happened with the very first user, created via console during the
>> installation.
>> Login was w.trumbitta
>> User creation went fine, but then there were the described problems.
>>
>> Maybe it's more a glitch than a real bug?
>>
>> Bau,
>> Wiz
>>
>> Il giorno 14/mag/2011 19:10, "Rodrigo Rosenfeld Rosas"
>> <rr.ro...@gmail.com <mailto:rr.ro...@gmail.com> <mailto:rr.ro...@gmail.com <mailto:rr.ro...@gmail.com>>> ha scritto:
>> > Em 12-05-2011 05:33, Wiz of Id escreveu:
>> >> production.log:
>> >>
>> ...
>> >> Read somewhere on the net that this happens to someone when the
>> >> username has a . in it.
>> >> Given the reason is really that, what can I do to fix the issue :) ?
>> >
>> > Hi Wiz,
>> >
>> > I tried to replicate your problem but Gitorious didn't allowed me to
>> > create a username with a dot in it. How did you get that?
>> >
>> > Regards, Rodrigo.
>
> --
> To post to this group, send email to gitorious@googlegroups.com <mailto:gitorious@googlegroups.com>
> To unsubscribe from this group, send email to
> gitorious+unsubscr...@googlegroups.com <mailto:gitorious%2bunsubscr...@googlegroups.com>
--
To post to this group, send email to gitorious@googlegroups.com
To unsubscribe from this group, send email to
gitorious+unsubscr...@googlegroups.com

--
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