354c05a4ddd678c49bcbba458bffa7d13482139a
bernd First draft of gitolite-mod...

bernd authored 12 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

5) Written by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

6)   Bernd Wurst <bernd@schokokeks.org>
7)   Hanno Böck <hanno@schokokeks.org>
8) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

10) 
11) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
12) */
13) 
bernd First draft of gitolite-mod...

bernd authored 12 years ago

14) require_role(ROLE_SYSTEMUSER);
15) 
16) include('git.php');
17) 
18) $section = 'git_git';
19) 
20) $handle = '';
21) if (isset($_GET['handle'])) {
Bernd Wurst Umstellung von filter_input...

Bernd Wurst authored 4 years ago

22)     $handle = verify_input_identifier($_GET['handle']);
bernd First draft of gitolite-mod...

bernd authored 12 years ago

23) }
24) 
25) $action = '';
26) $form = '';
27) 
28) $pubkey = '';
29) 
30) if ($handle) {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

31)     $action = 'newkey';
32)     title('Neuen SSH-Key für GIT-Benutzer');
33)     output('<p>Legen Sie hier einen neuen SSH-Key für einen bestehenden Benutzer fest.</p>');
34)     $pubkey = get_pubkey($handle);
bernd First draft of gitolite-mod...

bernd authored 12 years ago

35) } else {
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

36)     $action = 'newuser';
37)     title('Neuer GIT-Benutzer');
38)     output('<p>Tragen Sie hier einen eindeutigen Namen für den neuen Benutzer fest und hinterlegen Sie einen SSH-Public-Key.</p><p><strong>Hinweis:</strong> Es wird nicht funktionieren, mehrere GIT-Zugänge mit dem selben Public-Key einzurichten. Soll ein Entwickler auf GIT-Repositories mehrerer unserer Kunden zugreifen, dann darf der Benutzer nur einmal angelegt werden und muss bei den übrigen Kunden als "GIT-Benutzer eines anderern Kunden" freigeschaltet werden.</p>');
bernd First draft of gitolite-mod...

bernd authored 12 years ago

39) }
40) 
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

41) $userprefix = $_SESSION['userinfo']['username'] . '-';
bernd First draft of gitolite-mod...

bernd authored 12 years ago

42) 
43) $form .= '<table><tr><td><label for="handle" />Name des Benutzers:</label></td>';
44) if ($handle) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

45)     $form .= '<td><input type="hidden" name="handle" value="' . filter_output_html(str_replace($userprefix, '', $handle)) . '" /><strong>' . filter_output_html($handle) . '</strong></td></tr>';
bernd First draft of gitolite-mod...

bernd authored 12 years ago

46) } else {
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

47)     $form .= '<td>' . $userprefix . '<input type="text" id="handle" name="handle" value="' . $handle . '" /></td></tr>';
bernd First draft of gitolite-mod...

bernd authored 12 years ago

48) }
Hanno Böck Spaces between string conca...

Hanno Böck authored 6 months ago

49) $form .= '<tr><td><label for="pubkey">SSH-Public-Key:</label></td><td><textarea name="pubkey" id="pubkey" cols="70" rows="10">' . filter_output_html($pubkey) . '</textarea></td></tr>