bernd commited on 2011-12-21 16:51:54
Zeige 3 geänderte Dateien mit 7 Einfügungen und 3 Löschungen.
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@2098 87cf0b9e-d624-0410-a070-f6ee81989793
| ... | ... |
@@ -4,6 +4,7 @@ require_once('inc/icons.php');
|
| 4 | 4 |
include('git.php');
|
| 5 | 5 |
require_role(ROLE_SYSTEMUSER); |
| 6 | 6 |
|
| 7 |
+$section = 'git_git'; |
|
| 7 | 8 |
title("GIT-Zugänge");
|
| 8 | 9 |
|
| 9 | 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>");
|
| ... | ... |
@@ -25,11 +26,12 @@ foreach ($repos as $repo => $settings) {
|
| 25 | 26 |
$public_string = ''; |
| 26 | 27 |
if ($public) {
|
| 27 | 28 |
$public_url = 'http://git.schokokeks.org/'.$repo.'.git'; |
| 28 |
- $public_string = '(Öffentlich abrufbar über <a href="'.$public_url.'">'.$public_url.'</a>)'; |
|
| 29 |
+ $git_url = 'git://git.schokokeks.org/'.$repo.'.git'; |
|
| 30 |
+ $public_string = '(Öffentlicher Lesezugriff über <a href="'.$public_url.'">'.$public_url.'</a> und '.$git_url.')'; |
|
| 29 | 31 |
} |
| 30 | 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>");
|
| 31 | 33 |
foreach ($settings['users'] as $user => $rights) {
|
| 32 |
- if ($user == 'gitweb') {
|
|
| 34 |
+ if ($user == 'gitweb' || $user == 'daemon') {
|
|
| 33 | 35 |
continue; |
| 34 | 36 |
} |
| 35 | 37 |
$grant = ''; |
| ... | ... |
@@ -344,7 +344,7 @@ function save_repo($repo, $permissions, $description) |
| 344 | 344 |
|
| 345 | 345 |
$data[] = "\n"; |
| 346 | 346 |
if ($description) {
|
| 347 |
- $description = preg_replace('/[\'"\r\n/', '', $description);
|
|
| 347 |
+ $description = preg_replace('/\[\'"\r\n/', '', $description);
|
|
| 348 | 348 |
$realname = $_SESSION['userinfo']['name']; |
| 349 | 349 |
$data[] = "{$repo} \"{$realname}\" = \"{$description}\"\n";
|
| 350 | 350 |
} |
| ... | ... |
@@ -1,6 +1,7 @@ |
| 1 | 1 |
<?php |
| 2 | 2 |
require_role(ROLE_SYSTEMUSER); |
| 3 | 3 |
|
| 4 |
+$section = 'git_git'; |
|
| 4 | 5 |
include('git.php');
|
| 5 | 6 |
|
| 6 | 7 |
if ($_GET['action'] == 'newuser') {
|
| ... | ... |
@@ -45,6 +46,7 @@ if ($_GET['action'] == 'newuser') {
|
| 45 | 46 |
} |
| 46 | 47 |
if ($_POST['gitweb'] == 'r') {
|
| 47 | 48 |
$permissions['gitweb'] = 'R'; |
| 49 |
+ $permissions['daemon'] = 'R'; |
|
| 48 | 50 |
$description = $_POST['description']; |
| 49 | 51 |
} else {
|
| 50 | 52 |
$description = NULL; |
| 51 | 53 |