Permalink
Browse files

set-default-roles should not kick in always...

should only do its thing when called from someone creating a new wild
repo, and not just changing its perms.  (Because, don't forget, the
POST_CREATE trigger list is invoked from perms also).
  • Loading branch information...
sitaramc committed Apr 2, 2013
1 parent 1136570 commit 1dea1b636c8f6e7b0d7597a0bbca86c86cf1f4c2
Showing with 1 addition and 0 deletions.
  1. +1 −0 src/triggers/set-default-roles
@@ -6,6 +6,7 @@
# skip if arg-1 is POST_CREATE and no arg-3 (user name) exists (i.e., it's not
# a wild repo)
[ "$1" = "POST_CREATE" ] && [ -z "$3" ] && exit 0;
+[ "$4" = "R" ] || [ "$4" = "W" ] || [ "$4" = "perms-c" ] || [ "$4" = "fork" ] exit 0
die() { echo "$@" >&2; exit 1; }

0 comments on commit 1dea1b6

Please sign in to comment.