[PATCH] hgweb/localrepo: pass the request object to hooks

Sune Foldager cryo at cyanite.org
Fri Nov 6 15:32:16 CST 2009


Since pretxnchangegroup is probably the only interesting hook for doing
authorization (also used by the acl hook), it would be sufficient if the
request object, or even just its environment map, were somehow passed on
to the localrepo.addchangegroup function (a keyword argument perhaps),
so it can pass it on to the hook invocation.

I really feel we should do this one way or another, since it's really
the only vector for custom auth based on pushed content. For
content-agnostic auth, check_perm hooks can be used.

So how about it?

/Sune



More information about the Mercurial-devel mailing list