2 # (c) Petr Baudis <pasky@suse.cz>
11 my $repo = Girocco
::CGI
->new('User Registration');
14 if ($cgi->param('mail')) {
15 print "<p>Go away, bot.</p>";
19 if ($cgi->param('name')) {
20 # submitted, let's see
21 # FIXME: racy, do a lock
22 my $name = $repo->wparam('name');
23 valid_user_name
($name)
24 and Girocco
::User
::does_exist
($name)
25 and $repo->err("User with that name already exists.");
27 my $user = Girocco
::User
->ghost($name);
28 if ($user->cgi_fill($repo)) {
31 <p>User $name successfuly registered.</p>
32 <p>Project administrators can now <a href="editproj.cgi">assign you</a> to have a push access to their projects
33 (use project name as username, admin password as password).
34 (One user can have push access to multiple projects and multiple users can have push access to one project.)
36 <p>Congratulations!</p>
43 <p>Here you can register a user.
44 You need to register a user so that it can be granted project(s) push access.</p>
45 <p>SSH is used for pushing (the <tt>ssh</tt> protocol), your SSH key authenticates you -
46 there is no password (though we recommend that your SSH key is password-protected; use <code>ssh-agent</code> to help your fingers).
47 You can find your public key in <tt>~/.ssh/id_rsa.pub</tt> or <tt>~/.ssh/id_dsa.pub</tt>.
48 If you do not have any yet, generate it using the <code>ssh-keygen</code> command.
49 You can paste multiple keys in the box below, each on a separate line. Paste each key <em>including</em> the <tt>ssh-</tt>whatever prefix and email-like postfix.</p>
50 <p>We won't bother to verify your email contact,
51 but fill in something sensible in your own interest
52 so that we can contact you or confirm your identity shall the need arise. We also need to send you an e-mail if you want to update your SSH keys later.</p>
53 <p>By submitting this form, you are confirming that you will push only free software
54 and no content that would violate any law of $Girocco::Config::jurisdiction. Have fun!</p>
56 <p>Login: <input type="text" name="name" /></p>
57 <p>Email: <input type="text" name="email" /></p>
58 <p>Public SSH key(s): <textarea name="keys" rows="5" cols="80"></textarea></p>
59 <p style="display:none">Anti-captcha (leave empty!): <input type="text" name="mail" /></p>
60 <p><input type="submit" name="y0" value="Register" /></p>