mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-09-19 04:59:01 +00:00
- Regression: Users who to don't have git-access permission can't access the public repositories. Tests: - Functional tests work. - Admin user is able to view and access the repos when there are some public repos and when there no public repos. - User belonging to git-access are regular usrs are unable to access private repos. But they are also not able to access the public repos. They have to logout to be able to do that. - Anonymous user is not able to access the application if all repos are private. If there is at least one public repo, the repo listing can be accessed and public repos can be seen and accessed. Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
62 lines
1.5 KiB
Plaintext
62 lines
1.5 KiB
Plaintext
# path to git projects (<project>.git)
|
|
$projectroot = "/var/lib/git";
|
|
|
|
# directory to use for temp files
|
|
$git_temp = "/tmp";
|
|
|
|
# target of the home link on top of all pages
|
|
#$home_link = $my_uri || "/";
|
|
|
|
# html text to include at home page
|
|
#$home_text = "indextext.html";
|
|
|
|
# file with project list; by default, simply scan the projectroot dir.
|
|
#$projects_list = $projectroot;
|
|
|
|
# stylesheet to use
|
|
@stylesheets = ("/gitweb/static/gitweb.css");
|
|
|
|
# javascript code for gitweb
|
|
$javascript = "/gitweb/static/gitweb.js";
|
|
|
|
# logo to use
|
|
$logo = "/gitweb/static/git-logo.png";
|
|
|
|
# the 'favicon'
|
|
$favicon = "/gitweb/static/git-favicon.png";
|
|
|
|
# git-diff-tree(1) options to use for generated patches
|
|
#@diff_opts = ("-M");
|
|
|
|
# enable short urls
|
|
$feature{'pathinfo'}{'default'} = [1];
|
|
|
|
# enable git blame
|
|
$feature{'blame'}{'default'} = [1];
|
|
$feature{'blame'}{'override'} = 1;
|
|
|
|
# enable pickaxe search
|
|
$feature{'pickaxe'}{'default'} = [1];
|
|
$feature{'pickaxe'}{'override'} = 1;
|
|
|
|
# enable syntax highlighting
|
|
$feature{'highlight'}{'default'} = [1];
|
|
$feature{'highlight'}{'override'} = 1;
|
|
|
|
# disable snapshots
|
|
$feature{'snapshot'}{'default'} = [];
|
|
$feature{'snapshot'}{'override'} = 1;
|
|
|
|
# do not recursively scan for Git repositories
|
|
our $project_maxdepth = 1;
|
|
|
|
# export private repos only if authorized
|
|
our $per_request_config = sub {
|
|
if(defined $ENV{'REMOTE_USER'}){
|
|
our $export_auth_hook = sub { return 1; };
|
|
}
|
|
else {
|
|
our $export_auth_hook = sub { return ! -e "$_[0]/private"; };
|
|
}
|
|
};
|