-
Notifications
You must be signed in to change notification settings - Fork 999
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEFAULT_ROLE_PERMS replaced by per repo 'default.roles' option
- Loading branch information
Showing
5 changed files
with
39 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
# POST_CREATE trigger to set up default set of perms for a new wild repo | ||
|
||
# ---------------------------------------------------------------------- | ||
# 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; | ||
|
||
die() { echo "$@" >&2; exit 1; } | ||
|
||
cd $GL_REPO_BASE/$2.git || die "could not cd to $GL_REPO_BASE/$2.git" | ||
gitolite git-config -r $2 gitolite-options.default.roles | sort | cut -f3 | | ||
perl -pe 's/(\s)CREATOR(\s|$)/$1$ENV{GL_USER}$2/' > gl-perms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters