@add: Enables dynamic http_user.

This commit is contained in:
Hologos
2016-09-23 19:33:03 +02:00
parent ecc8e97117
commit 7192e5844a
2 changed files with 2 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ use_https = true ; generate URL with https://
url_subdir = 'git/' ; if cloning via HTTP is triggered using virtual dir (e.g. https://example.com/git/repo.git)
; has to end with trailing slash
http_user = '' ; user to use for cloning via HTTP (default: none)
http_user_dynamic = false ; when enabled, http_user is set to $_SERVER['PHP_AUTH_USER']
; If you need to specify custom filetypes for certain extensions, do this here
[filetypes]

View File

@@ -42,7 +42,7 @@ class Application extends SilexApplication
$this['show_http_remote'] = $config->get('clone_button', 'show_http_remote');
$this['use_https'] = $config->get('clone_button', 'use_https');
$this['url_subdir'] = $config->get('clone_button', 'url_subdir');
$this['http_user'] = $config->get('clone_button', 'http_user');
$this['http_user'] = $config->get('clone_button', 'http_user_dynamic') ? $_SERVER['PHP_AUTH_USER'] : $config->get('clone_button', 'http_user');
$this['show_ssh_remote'] = $config->get('clone_button', 'show_ssh_remote');
$this['ssh_user'] = $config->get('clone_button', 'ssh_user');