diff options
author | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-01-27 13:51:29 +0000 |
---|---|---|
committer | Richard Ipsum <richard.ipsum@codethink.co.uk> | 2014-01-27 13:51:29 +0000 |
commit | bfb17d3a2e75547e36bb27856dbb74e31b8fd347 (patch) | |
tree | 98efadb4e84aa7ab32bf42845ef16b99d0045c3d | |
parent | 0c3029e567b5c17df5ae14f16dcc5cc666041dc6 (diff) | |
download | gitano-bfb17d3a2e75547e36bb27856dbb74e31b8fd347.tar.gz |
change to user
-rwxr-xr-x | cgi/gitano-smart-http.cgi | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cgi/gitano-smart-http.cgi b/cgi/gitano-smart-http.cgi index 02412f0..0d34219 100755 --- a/cgi/gitano-smart-http.cgi +++ b/cgi/gitano-smart-http.cgi @@ -177,11 +177,11 @@ end request_method = os.getenv("REQUEST_METHOD") if request_method == "GET" or request_method == "POST" then - local authenticated_user = os.getenv("REMOTE_USER") + local user = os.getenv("REMOTE_USER") or "gitano/anonymous" local cmdline = parse_request(request_method) - if authenticated_user and cmdline - and is_authorized(authenticated_user, cmdline) then + if user and cmdline + and is_authorized(user, cmdline) then -- set the push env var or whatever if push access is required os.execute("/usr/lib/git-core/git-http-backend") else |