fix up gitweb, daemon, for wild + big-config

Implementation notes:

  - %repo_config is now "our", not "my"
  - collect_repo_patts now uses repo_rights to get the name of the wild
    card repo (if any) that pertains to the physical $repo, instead of
    all that new code (duh!)
  - new "can_read(repo, user)" sub (to help daemon and gitweb use)
  - the "convenience copy on steroids" thing now copies %repo_config
    also, not just %repos.  This makes setup_repo_configs simpler
  - $creator gets substituted into %groups also; we need that now that
    we (%repos and %groups) are working closer together :)
This commit is contained in:
Sitaram Chamarty 2010-07-19 16:47:38 +05:30
parent 8deee9b6bd
commit f21e7780a1
3 changed files with 58 additions and 52 deletions

View file

@ -207,10 +207,9 @@ if ($perm =~ /C/) {
# it was missing, and you have create perms
wrap_chdir("$ENV{GL_REPO_BASE_ABS}");
new_repo($repo, "$GL_ADMINDIR/hooks/common", $user);
&setup_repo_configs($repo, $ENV{GL_REPOPATT}, \%repo_config);
&setup_daemon_access($repo, $repos{$ENV{GL_REPOPATT}}{'R'}{'daemon'} || '');
&setup_gitweb_access($repo, $repos{$ENV{GL_REPOPATT}}{'R'}{'gitweb'} || '', '', '');
system("echo $repo.git >> $PROJECTS_LIST");
&setup_repo_configs($repo, \%repo_config);
&setup_daemon_access($repo);
system("echo $repo.git >> $PROJECTS_LIST") if &setup_gitweb_access($repo, '', '');
wrap_chdir($ENV{HOME});
}