Commit graph

64 commits

Author SHA1 Message Date
Sitaram Chamarty af6820a94b new functions (can_*, is_admin, in_group) for ADCs
(can_* == can_read, can_write, and can_create)

See top of contrib/adc/adc.common-functions for more on this.

Note: the old style (calling get_rights_and_owner with $repo, then
checking $perm_read, $perm_write, etc.), will still work fine.
2011-11-22 19:31:41 +05:30
Sitaram Chamarty 6e29365316 MASSIVE set of changes to documents!
I got tired of being told "TL;DR".  Now the online versions of most
documents fit on a page or two, or at least most of them do.  The rest
has been split out (and you can see the links to the split out sections
right where the text is in the raw Markdown).

This is much more pleasant to read, and I've improved the linking so
it's much less effort for me to keep the links correct.
2011-11-02 21:04:33 +05:30
Sitaram Chamarty 877c6625dc minor docfixes
typos, minor clarifications, removing outdated stuff that got missed,
adding some emphasis here and there, re-phrasing some places, etc.
2011-10-30 09:11:04 +05:30
Sitaram Chamarty 200db6e486 user-manual added ("user" as opposed to "admin")
Normally, I use the word "user" in gitolite to mean *my* users, who are
actually admins on their setups.  All my documentation has been geared
to that class of person.

Last night my most famous "user" (not "admin", a real gitolite user)
mentioned that he found it very hard to find info on what a *user* could
do, and he was right.  So here goes...
2011-10-29 06:28:33 +05:30
Sitaram Chamarty f050938171 (minor) add a warning to rsync ADC
...in case someone wants to make it "ua"
2011-10-20 16:39:18 +05:30
Jeff Mitchell 1a6fa8b718 Add option to have "list" be the default action for the help ADC 2011-10-18 09:27:21 +05:30
Joey Hess e2d9ce6368 update documentation for git-annex-shell ua ADC 2011-10-18 08:13:57 +05:30
Sitaram Chamarty d750725a34 fix rsync adc to call check_access the correct way...
also a test fix
2011-10-17 22:10:18 +05:30
Sitaram Chamarty 85da5572b2 some nice ADC changes... (warning: minor backward compat breakage)
- support for ADCs with unchecked arguments
  - rsync, htpasswd, and svnserve gone from core; turned into ADCs

Backward compat breakage and fix: Please see documentation for details,
but if you're using gitolite to control rsync you will now need to setup
ADCs (admin defined commands), and install at least the new "rsync" ADC.

----

Thanks to Joey Hess (see commit prior to this) for forcing me to stop
being lazy and get this out of my long term todo list.
2011-10-17 18:42:57 +05:30
Joey Hess 955edcc5ec git-annex support via unrestricted ADC 2011-10-17 17:33:03 +05:30
Sitaram Chamarty 22bd3c8e72 (projects.list changes) collect gitweb-specific stuff in one place
also
  - new "WEB_INTERFACE" variable (defaults to 'gitweb')
  - setup_web_access (write a plain list of repos out)
  - add_del_web_access (add/delete a single repo from projects.list)
2011-10-06 19:32:09 +05:30
Sitaram Chamarty 8b501a1872 (doc) assorted docfixes 2011-09-28 04:23:32 +05:30
Sitaram Chamarty a2fd597c51 'symbolic-ref' ADC replaces and obsoletes 'set-head'
set-head was too specific.  See comments in symbolic-ref for more on
this ADC, but basically it lets you run 'git symbolic-ref' on a repo
that you have write access to.

(in response to http://comments.gmane.org/gmane.comp.version-control.git/182067)
2011-09-26 19:43:57 +05:30
Sitaram Chamarty 7b8866dbf6 (password access) can now do ADCs also
idea credit Jeff (though I'm sure he didn't ask this on behalf of the
KDE folks ;-)
2011-09-16 09:15:42 +05:30
Sitaram Chamarty 10985cb534 repo_rights is no longer a kosher *public* interface
so remove the last vestiges of it from the contrib area
2011-09-02 22:41:27 +05:30
Sitaram Chamarty b649536847 (minor) fixed some broken links due to 867b34f
thanks to j416 for catching this...
2011-07-18 21:06:14 +05:30
Sitaram Chamarty 6ad6bf95e6 (adc) change quoting when calling cli_repo_rights from shell
otherwise repo names containing "@" in them were causing the @foo part
to be interpolated (as empty of course) instead of being taken literally

reported by silvio dot fricke at googlemail
2011-06-26 11:33:56 +05:30
Sitaram Chamarty fda9f37b3a die() needs to be defined in post-update hook
(and in one other place it needs to be defined earlier)

I never caught this because in my testing those error conditions --
caused by lack of afc3a06 -- never came up.
2011-06-19 06:54:52 +05:30
Sitaram Chamarty cf1987e747 (sskm) document courtesy Jeff Mitchell
I'd originally written some minimal documentation for this ADC, but I
liked Jeff's version so much that I borrowed it, added the final section
("important notes for the admin"), made a few other minor fixups, and
then happily ditched my version.
2011-06-01 20:17:55 +05:30
Sitaram Chamarty d402b093b7 (sskm) hush output from internal git commands
(the ones that require GL_BYPASS_UPDATE_HOOK to be set are done slightly
differently because I just didn't want all the hassle of saving and
restoring that variable on the perl side)
2011-06-01 12:16:23 +05:30
Sitaram Chamarty 4942fdbe0e (sskm) not finding a key in the list is not always fatal...
[caught by Jeff...]
2011-06-01 12:16:23 +05:30
Sitaram Chamarty 9e01778796 (sskm) self-service key management -- new adc
based on a discussion with Jeff from the KDE team; see doc for more.
2011-06-01 12:16:19 +05:30
Sitaram Chamarty 867b34f32c (doc) ADCs now have an overview doc, plus...
- repo-deletion is now a proper doc
  - other doc enhancements and clarifications
2011-05-12 09:33:19 +05:30
Sitaram Chamarty 18c69e8612 su-getperms and su-setperms 2011-05-08 11:22:42 +05:30
Sitaram Chamarty 89b68bf5ca new adc to allow deleting a branch that you created; see below
The need for this comes about as follows:

  - a project may allow its developers "RWC" (or "RW+C") so that they
    can create feature branches when needed.  Note that these are
    *feature* branches, so they can't use the "personal branches"
    mechanism that gitolite already has.

  - the developers are *not* given RWCD (or RW+CD) to prevent accidental
    deletion of an important branch.  Branch *deletion* is something
    that only a few trusted admins can do.

  - as a result, there are sometimes situations where a developer
    creates a misnamed branch and then has to ask the admins to help get
    rid of it.

What the KDE folks wanted was a way to allow the creator of a branch to
be able to delete it.  In addition, they needed this allowed only for a
fixed duration after the creation of a branch, not forever (for the same
reason they don't get RWCD, to prevent accidents).

These are my reasons why this feature is implemented as an ADC instead
of being "in core":

  - we'd need additional syntax to differentiate this special case
    (which is sort of in between RWC and RWCD, if you think about it).

    I'm reluctant to complicate the syntax further for something that is
    only occasionally needed.

  - we'd need either (a) code to parse the log files, or, (b) code to
    maintain "who created this ref" on every push that creates a ref.

      - parsing the log files is too kludgy and inelegant to be in core,
        not to mention potentially very slow for really large projects

      - code to maintain the a history of "who created this ref" is too
        cumbersome, especially because of the need to expire old entries
        after a time.
2011-05-02 07:15:12 +05:30
Sitaram Chamarty 6a51bae400 update s3backup adc to disable pushes first
(ref http://sitaramc.github.com/gitolite/doc/3-faq-tips-etc.html#_disabling_write_access_to_take_backups)

code from David Bremner via email
2011-04-24 15:14:37 +05:30
Sitaram Chamarty e73f1cea93 'hub' adc request-status subcommand can ask for details by request-number 2011-03-13 16:57:54 +05:30
Sitaram Chamarty 719edd007c 's3backup' adc contributed by David Bremner 2011-03-13 09:37:50 +05:30
Sitaram Chamarty c3787e2d17 hub adc had an unused extra return value from check_access; fixed 2011-03-13 09:37:50 +05:30
Sitaram Chamarty aab5ec9e6a 'hub' ADC takes patterns for 'list-request', has new 'accept' command
(plus a few minor fixes)
2011-03-05 12:23:17 +05:30
Sitaram Chamarty 6d3c2fbcef 'hub' ADC doc and rudimentary test script 2011-03-03 15:39:54 +05:30
Sitaram Chamarty 49e64a4f11 'hub' ADC 2011-03-03 15:39:54 +05:30
Sitaram Chamarty e7d55899f3 fork adc acquired some good ideas from the KDE folks 2011-02-25 21:15:08 +05:30
Sitaram Chamarty cec94a3664 (minor) who-pushed adc falls afoul of egrep incompat between Linux distros!
It seems even within Linux, not all "egrep"s are equal.  So we fall back
to the one true standard :-)

[caught by Jeff from the KDE team]
2011-02-25 06:21:17 +05:30
Sitaram Chamarty bdef55eee9 (minor) bashism fixes, usability fix, for "able" adc 2011-02-25 06:21:13 +05:30
Sitaram Chamarty 02128ff48f (minor doc fixes) 2011-02-21 21:25:43 +05:30
Sitaram Chamarty 948f700c7a supercool new admin-defined command "git" (disabled by default)
This new adc allows you to run arbitrary git commands on the server.

It is disabled by default, and you have to READ ALL INSTRUCTIONS **AND**
SOURCE CODE BEFORE DEPLOYING.
2011-02-10 14:01:08 +05:30
Richard Bateman 00a926bf48 Added perms PDC to supplement setperms/getperms
- Also added pygitolite.py as a helper library for python PDC apps
2011-01-21 14:14:09 +05:30
Richard Bateman 108f8e96a2 Added PDC set-head for setting the HEAD ref on a remote branch that you have write access to 2011-01-21 14:14:09 +05:30
Sitaram Chamarty 692552d146 gitolite v2.0rc1 -- please see new developer-notes doc 2011-01-16 07:26:13 +05:30
Sitaram Chamarty 5b9bf700cc allow access checks from ADC or hook
For sample code see new file contrib/adc/get-rights-and-owner.in-perl.
Despite the name, you can use similar code in a hook also -- comments in
that file will tell you how.

implementation notes:

  - check_access now takes an optional last arg "dry_run", which is also
    passes through to check_ref
  - check_ref returns a "DENIED by ..." instead of die-ing if dry_run is
    passed in

  - as a side effect, cli_repo_rights is now just a stub calling
    check_access (we kept it hanging around for backward compat -- too
    much adc pain for too many people if we change it now)
2010-12-25 12:40:41 +05:30
Sitaram Chamarty 74726fdc31 added watch ADC (includes documentation), courtesy mitchell@kde.org 2010-11-18 12:40:09 +05:30
Sitaram Chamarty 7313d48247 gitolite-down: disable write-access to take backups
(we quietly do not document the 'able' adc, which is now the most
"official" adc in the sense that it has a new test, t64-write-able!)

other notes: fix bug in 'able' (not setting $loc)
2010-11-16 22:57:23 +05:30
Sitaram Chamarty 6386d8ca2f gl-reflog adc gains 'usage', loses some crappy warnings
(actually these warnings can come in many other situations; I just
noticed them when testing this adc)
2010-10-28 19:34:46 +05:30
Sitaram Chamarty 5b3dcb3757 a slew of adc changes; details below:
- get_rights_and_owner normalises its arg1 by stripping .git if
    supplied, then sets the variable "repo" to the result as a side
    effect
  - new "help" adc with some default text but main purpose is to allow
    site local help text
  - other adc's refer to 'help' adc when appropriate
  - 'undelete' renamed to 'restore'; that's what the KDE "trashcan"
    program calls that operation
  - minor typo in sample script in documentation
  - main adc doc points to contrib/adc/repo-deletion.README now
2010-10-28 16:43:04 +05:30
Sitaram Chamarty 9fc521930d new adc: "who-pushed" prints the last person who pushed the given sha 2010-10-27 18:45:51 +05:30
Sitaram Chamarty 66b65e5e1d (doh!) make gitolite.pm easier for packagers
should have done this long ago...
2010-10-23 17:43:19 +05:30
Sitaram Chamarty cb0a9bdb0c ADC "rmrepo" replaced by "rm" and "trash", with helper ADCs
helpers for 'rm': lock, unlock
helpers for 'trash': list-trash, undelete

common functions updated with local settings for ADCs as well
2010-10-22 17:43:09 +05:30
Sitaram Chamarty 99d6b4875c adc su-expand to allow admin to run 'expand' on other users 2010-10-16 12:22:47 +05:30
Sitaram Chamarty ba39d93e28 (minor glitch in sudo adc)
thanks to jeff for finding it...
2010-10-06 22:57:45 +05:30