wildrepos: implement getperms and setperms
This commit is contained in:
parent
6214ad3ab6
commit
f620044156
2 changed files with 50 additions and 2 deletions
|
@ -123,6 +123,26 @@ sub repo_rights
|
|||
return ($c, $r, $w);
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# getperms and setperms
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
sub get_set_perms
|
||||
{
|
||||
my($repo_base_abs, $repo, $verb, $user) = @_;
|
||||
my ($creater, $dummy, $dummy2) = &repo_rights($repo_base_abs, $repo, "");
|
||||
die "$repo doesnt exist or is not yours\n" unless $user eq $creater;
|
||||
wrap_chdir("$repo_base_abs");
|
||||
wrap_chdir("$repo.git");
|
||||
if ($verb eq 'getperms') {
|
||||
print STDERR `cat gl-perms 2>/dev/null`;
|
||||
} else {
|
||||
system("cat > gl-perms");
|
||||
print STDERR "New perms are:\n";
|
||||
print STDERR `cat gl-perms`;
|
||||
}
|
||||
}
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# parse the compiled acl
|
||||
# ----------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue