some minor rearrangements of code...
why? now that would be telling!
This commit is contained in:
parent
a509b208e3
commit
8a9564f171
|
@ -70,8 +70,12 @@ sub access {
|
||||||
_die "invalid user '$user'" if not( $user and $user =~ $USERNAME_PATT );
|
_die "invalid user '$user'" if not( $user and $user =~ $USERNAME_PATT );
|
||||||
sanity($repo);
|
sanity($repo);
|
||||||
|
|
||||||
my $deny_rules = option( $repo, 'deny-rules' );
|
my @rules;
|
||||||
|
my $deny_rules;
|
||||||
|
|
||||||
load($repo);
|
load($repo);
|
||||||
|
@rules = rules( $repo, $user );
|
||||||
|
$deny_rules = option( $repo, 'deny-rules' );
|
||||||
|
|
||||||
# sanity check the only piece the user can control
|
# sanity check the only piece the user can control
|
||||||
_die "invalid characters in ref or filename: '$ref'\n" unless $ref =~ $REF_OR_FILENAME_PATT;
|
_die "invalid characters in ref or filename: '$ref'\n" unless $ref =~ $REF_OR_FILENAME_PATT;
|
||||||
|
@ -89,7 +93,6 @@ sub access {
|
||||||
return "$aa $ref $repo $user DENIED by existence";
|
return "$aa $ref $repo $user DENIED by existence";
|
||||||
}
|
}
|
||||||
|
|
||||||
my @rules = rules( $repo, $user );
|
|
||||||
trace( 2, scalar(@rules) . " rules found" );
|
trace( 2, scalar(@rules) . " rules found" );
|
||||||
for my $r (@rules) {
|
for my $r (@rules) {
|
||||||
my $perm = $r->[1];
|
my $perm = $r->[1];
|
||||||
|
@ -304,9 +307,11 @@ sub load_1 {
|
||||||
sub memberships {
|
sub memberships {
|
||||||
trace( 3, @_ );
|
trace( 3, @_ );
|
||||||
my ( $type, $base, $repo ) = @_;
|
my ( $type, $base, $repo ) = @_;
|
||||||
|
$repo ||= '';
|
||||||
|
my @ret;
|
||||||
my $base2 = '';
|
my $base2 = '';
|
||||||
|
|
||||||
my @ret = ( $base, '@all' );
|
@ret = ( $base, '@all' );
|
||||||
|
|
||||||
if ( $type eq 'repo' ) {
|
if ( $type eq 'repo' ) {
|
||||||
# first, if a repo, say, pub/sitaram/project, has a gl-creator file
|
# first, if a repo, say, pub/sitaram/project, has a gl-creator file
|
||||||
|
|
Loading…
Reference in a new issue