diff options
author | Sitaram Chamarty <sitaram@atc.tcs.com> | 2012-03-22 14:45:30 +0530 |
---|---|---|
committer | Sitaram Chamarty <sitaram@atc.tcs.com> | 2012-03-24 10:30:46 +0530 |
commit | 0748b1225b6d5d07b9fed7fe0276510333947a65 (patch) | |
tree | f4032da09ec4c4b2bb3c322cfb7db03a190de0a5 /src/commands/desc | |
parent | trigger prefixes an extra first argument -- the trigger name (diff) | |
download | gitolite-gentoo-0748b1225b6d5d07b9fed7fe0276510333947a65.tar.gz gitolite-gentoo-0748b1225b6d5d07b9fed7fe0276510333947a65.tar.bz2 gitolite-gentoo-0748b1225b6d5d07b9fed7fe0276510333947a65.zip |
external programs can get settings from rc; see below
non-core programs can get their settings from the rc file also.
cpu-time is a perl example and desc is a shell example.
(info is not a good example because it does not use "Gitolite::Easy")
Diffstat (limited to 'src/commands/desc')
-rwxr-xr-x | src/commands/desc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/commands/desc b/src/commands/desc index 77466ee..4fa3060 100755 --- a/src/commands/desc +++ b/src/commands/desc @@ -16,7 +16,17 @@ repo=$1; shift # this shell script takes arguments that are completely under the user's # control, so make sure you quote those suckers! -gitolite creator "$repo" $GL_USER || die You are not authorised + +# kernel.org needs 'desc' to be available to people who have "RW" or above, +# not just the "creator". In fact they need it for non-wild repos so there +# *is* no creator. +if gitolite query-rc -q WRITER_CAN_UPDATE_DESC +then + gitolite access -q "$repo" $GL_USER W any || die You are not authorised +else + gitolite creator "$repo" $GL_USER || die You are not authorised +fi + # if it passes, $repo is a valid repo name so it is known to contain only sane # characters. This is because 'gitolite creator' return true only if there # *is* a repo of that name and it has a gl-creator file that contains the same |