diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-10-11 18:57:03 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-10-11 18:57:03 +0100 |
commit | 0c4a196cb0d72a8919207001374a3c7c31913733 (patch) | |
tree | 76f4d3ffca428ba48a0e4bbfd1d77f1e08881998 /git.liw.fi.sh | |
parent | e529aacf9e05d4196f02d5b4e9cf9317d00924f0 (diff) | |
download | liw-gitano-acl-test-suite-0c4a196cb0d72a8919207001374a3c7c31913733.tar.gz |
Test non-admin can only push to their own branches
Diffstat (limited to 'git.liw.fi.sh')
-rw-r--r-- | git.liw.fi.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/git.liw.fi.sh b/git.liw.fi.sh index 6f20266..d7df0b5 100644 --- a/git.liw.fi.sh +++ b/git.liw.fi.sh @@ -118,6 +118,22 @@ clone_with_ssh() } +# Push repo over ssh. + +push_with_ssh() +{ + local user="$1" + shift + if [ "$user" = admin ] + then + git push "$@" + else + KEYFILE="$DATADIR/$user.key" \ + PATH="$SRCDIR:$PATH" git push "$@" + fi +} + + # Remove a repository from the server. This is a two-step process. destroy_repo() |