aboutsummaryrefslogtreecommitdiffstats
path: root/modules/subversion/templates
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-06-01 14:20:47 +0000
committerNicolas Vigier <boklm@mageia.org>2011-06-01 14:20:47 +0000
commit2c790ac36382c26f73ec7848bed8106512cf754e (patch)
tree783600812513d77b4b4feba78055ad7251679baf /modules/subversion/templates
parent4db68d197baf6230fbdfd9b4d7a03f3127e53340 (diff)
downloadpuppet-2c790ac36382c26f73ec7848bed8106512cf754e.tar
puppet-2c790ac36382c26f73ec7848bed8106512cf754e.tar.gz
puppet-2c790ac36382c26f73ec7848bed8106512cf754e.tar.bz2
puppet-2c790ac36382c26f73ec7848bed8106512cf754e.tar.xz
puppet-2c790ac36382c26f73ec7848bed8106512cf754e.zip
allow restricting commits to a user
Diffstat (limited to 'modules/subversion/templates')
-rw-r--r--modules/subversion/templates/restricted_to_user12
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/subversion/templates/restricted_to_user b/modules/subversion/templates/restricted_to_user
new file mode 100644
index 00000000..5c70132e
--- /dev/null
+++ b/modules/subversion/templates/restricted_to_user
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+REP="$1"
+TXN="$2"
+
+author=$(svnlook author -t "$TXN" "$REP")
+
+if [ "$author" != '<%= restricted_to_user %>' ]; then
+ echo "this repository is restrected to user <%= restricted_to_user %>" >&2
+ exit 1
+fi
+