Project

General

Profile

Patch #3477 ยป no-need-for-svn-private.diff

Faidon Liambotis, 2009-06-10 21:54

View differences:

extra/svn/Redmine.pm (working copy)
database without an hassle but you need to have apache/mod_perl on the
svn server.
This can also be useful on other kinds of revision control systems
(for instance, Mercurial), but YMMV.
=head1 INSTALLATION
For this to automagically work, you need to have a recent reposman.rb
......
# RedmineDbWhereClause "and members.role_id IN (1,2)"
## Optional credentials cache size
# RedmineCacheCredsMax 50
</Location>
To be able to browse repository inside redmine, you must add something
like that :
<Location /svn-private>
DAV svn
SVNParentPath "/var/svn"
Order deny,allow
Deny from all
# only allow reading orders
# the following is needed to be able to
# browse the repository inside redmine
<Limit GET PROPFIND OPTIONS REPORT>
Order deny,allow
Deny from all
Allow from redmine.server.ip
Satisfy any
</Limit>
</Location>
and you will have to use this reposman.rb command line to create repository :
</Location>
reposman.rb --redmine my.redmine.server --svn-dir /var/svn --owner www-data -u http://svn.server/svn-private/
You will have to use this reposman.rb command line to create the repository :
reposman.rb --redmine my.redmine.server --svn-dir /var/svn --owner www-data -u http://svn.server/svn/
=head1 MIGRATION FROM OLDER RELEASES
If you use an older reposman.rb (r860 or before), you need to change
......
use Apache2::ServerRec qw();
use Apache2::RequestRec qw();
use Apache2::RequestUtil qw();
use Apache2::Const qw(:common :override :cmd_how);
use Apache2::Const qw(:common :override :cmd_how :satisfy);
use APR::Pool ();
use APR::Table ();
......
sub access_handler {
my $r = shift;
unless ($r->some_auth_required) {
unless ($r->some_auth_required || $r->satisfies == SATISFY_ANY) {
$r->log_reason("No authentication has been configured");
return FORBIDDEN;
}
......
$r->set_handlers(PerlAuthenHandler => [\&OK])
if is_public_project($project_id, $r);
return OK
return OK;
}
sub authen_handler {
    (1-1/1)