rmrepo alternative 2 was too lax

it would have allowed deleting a non-wild repo too!  Fixed.
This commit is contained in:
Sitaram Chamarty 2010-09-03 08:48:51 +05:30
parent 5188ec48ed
commit 07d07cc5f6

View file

@ -13,6 +13,8 @@ get_rights_and_owner $delete
# alternative 2 -- creator or anyone with W access to admin repo can delete
[ "$owner" = "$GL_USER" ] || {
# but only if it is wild
[ "$owner" = "<gitolite>" ] && die "$delete is not a wild repo"
get_rights_and_owner gitolite-admin
[ -z "$perm_write" ] && die "$delete is not yours to delete and you're not the admin"
}