From 07d07cc5f6ad79f963a2820bcac5f3b8098ce116 Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Fri, 3 Sep 2010 08:48:51 +0530 Subject: [PATCH] rmrepo alternative 2 was too lax it would have allowed deleting a non-wild repo too! Fixed. --- contrib/adc/rmrepo | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/adc/rmrepo b/contrib/adc/rmrepo index b35a422..42976f4 100755 --- a/contrib/adc/rmrepo +++ b/contrib/adc/rmrepo @@ -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" = "" ] && 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" }