This is an archive of the discontinued Mercurial Phabricator instance.

narrow: fix for getting the username when running http server
ClosedPublic

Authored by idlsoft on Feb 13 2018, 2:40 PM.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

idlsoft created this revision.Feb 13 2018, 2:40 PM
durin42 accepted this revision.Feb 13 2018, 3:31 PM
This revision is now accepted and ready to land.Feb 13 2018, 3:31 PM
This revision was automatically updated to reflect the committed changes.
indygreg added inline comments.
hgext/narrow/narrowbundle2.py
331

REMOTE_USER is an HTTP-ism and I think it is a layering violation to look for REMOTE_USER in code that is supposed to be protocol agnostic.

What I'm trying to say is I think we'll need to tweak this ACL code further when it is moved to core.

martinvonz added inline comments.
hgext/narrow/narrowbundle2.py
331

But you're okay with this version for now? This commit is currently the bottom-most draft commit in the "committed" repo, so please accept it if you're okay with it. I would have accepted, but I saw this comment and wasn't sure if you thought this was bad enough to not queue it.

I think it's fine for now. I accepted this commit.

idlsoft added inline comments.Feb 15 2018, 7:01 PM
hgext/narrow/narrowbundle2.py
331

Ideally I would have liked to have a userid method in repo.ui (or something like that), and have it used by both narrow and acl extension.
But I think this deserves a longer discussion, hence the quick fix.