1aaaa700cdfda9c1e0bd92741205d07d8e0132de
bernd First strike: list reposito...

bernd authored 12 years ago

1) <?php
bernd First draft of gitolite-mod...

bernd authored 12 years ago

2) require_once('inc/icons.php');
bernd First strike: list reposito...

bernd authored 12 years ago

3) 
4) include('git.php');
5) require_role(ROLE_SYSTEMUSER);
6) 
bernd GIT-URL eingebaut

bernd authored 12 years ago

7) $section = 'git_git';
bernd First draft of gitolite-mod...

bernd authored 12 years ago

8) title("GIT-Zugänge");
bernd First strike: list reposito...

bernd authored 12 years ago

9) 
bernd First draft of gitolite-mod...

bernd authored 12 years ago

10) output("<p>Das verteilte Versionskontrollsystem <a href=\"http://www.git-scm.org\">GIT</a> ist ein populäres Werkzeug um Programmcode zu verwalten. Mit dieser Oberfläche können Sie GIT-repositories erstellen und den Zugriff für mehrere Benutzer festlegen.</p>");
bernd Typo

bernd authored 12 years ago

11) output("<p>Wir verwenden das beliebte System »gitolite« um diese Funktionalität anzubieten. Gitolite erlaubt bei Bedarf weitaus feingliedrigere Kontrolle als dieses Webinterface. Fragen Sie bitte den Support, wenn Sie Interesse daran haben zusätzliche Berechtigungen einzurichten.</p>");
bernd First draft of gitolite-mod...

bernd authored 12 years ago

12) 
13) $repos = list_repos();
14) $users = list_users();
15) 
16) if (count($repos) == 0) {
17)   output("<p><em>bisher haben Sie keine GIT-Repositories</em></p>");
18) } else {
19)   output("<h3>Ihre GIT-Repositories</h3>"); 
20) }
21) 
bernd Setze Berechtigung für gitw...

bernd authored 12 years ago

22) foreach ($repos as $repo => $settings) {
23)   $description = $settings['description'] ? '<br /><em>"'.$settings['description'].'"</em>' : '';
bernd show URL

bernd authored 12 years ago

24)   $url = get_git_url($repo);
bernd Bessere Handhabung öffentli...

bernd authored 12 years ago

25)   $public = isset($settings['users']['gitweb']) && $settings['users']['gitweb'] == 'R';
26)   $public_string = '';
27)   if ($public) {
28)     $public_url = 'http://git.schokokeks.org/'.$repo.'.git';
bernd GIT-URL eingebaut

bernd authored 12 years ago

29)     $git_url = 'git://git.schokokeks.org/'.$repo.'.git';
bernd Kosmetik

bernd authored 12 years ago

30)     $public_string = '<br />(Öffentlicher Lesezugriff über <a href="'.$public_url.'">'.$public_url.'</a> und '.$git_url.')';
bernd Bessere Handhabung öffentli...

bernd authored 12 years ago

31)   }
bernd Sortiere Repositories und U...

bernd authored 12 years ago

32)   output("<div><p><strong>{$repo}</strong> ".internal_link('edit', icon_edit('Zugriffsrechte bearbeiten'), 'repo='.$repo)." ".internal_link('delete', icon_delete('Repository löschen'), 'repo='.$repo)."{$description}<br />push-Adresse: {$url} {$public_string}</p><ul>");
bernd Setze Berechtigung für gitw...

bernd authored 12 years ago

33)   foreach ($settings['users'] as $user => $rights) {
bernd GIT-URL eingebaut

bernd authored 12 years ago

34)     if ($user == 'gitweb' || $user == 'daemon') {
bernd Bessere Handhabung öffentli...

bernd authored 12 years ago

35)       continue;
36)     }