From: Matthieu Moy <Matthieu.Moy@imag.fr>
To: git@vger.kernel.org, gitster@pobox.com
Cc: Matthieu Moy <Matthieu.Moy@imag.fr>
Subject: [PATCH] git-remote-mediawiki: allow a domain to be set for authentication
Date: Wed, 28 Sep 2011 15:48:01 +0200 [thread overview]
Message-ID: <1317217681-18763-1-git-send-email-Matthieu.Moy@imag.fr> (raw)
In-Reply-To: <1317146100-22938-3-git-send-email-Matthieu.Moy@imag.fr>
When the wiki uses e.g. LDAP for authentication, the web interface shows
a popup to allow the user to chose an authentication domain, and we need
to use lgdomain in the API at login time.
Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr>
---
contrib/mw-to-git/git-remote-mediawiki | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/contrib/mw-to-git/git-remote-mediawiki b/contrib/mw-to-git/git-remote-mediawiki
index b809792..0b32d18 100755
--- a/contrib/mw-to-git/git-remote-mediawiki
+++ b/contrib/mw-to-git/git-remote-mediawiki
@@ -76,8 +76,10 @@ my $wiki_login = run_git("config --get remote.". $remotename .".mwLogin");
# inside a remote helper, so our stdin is connect to git, not to a
# terminal.
my $wiki_passwd = run_git("config --get remote.". $remotename .".mwPassword");
+my $wiki_domain = run_git("config --get remote.". $remotename .".mwDomain");
chomp($wiki_login);
chomp($wiki_passwd);
+chomp($wiki_domain);
# Import only last revisions (both for clone and fetch)
my $shallow_import = run_git("config --get --bool remote.". $remotename .".shallow");
@@ -158,6 +160,7 @@ sub mw_connect_maybe {
if (!$mediawiki->login({
lgname => $wiki_login,
lgpassword => $wiki_passwd,
+ lgdomain => $wiki_domain,
})) {
print STDERR "Failed to log in mediawiki user \"$wiki_login\" on $url\n";
print STDERR "(error " .
--
1.7.7.rc0.75.g56f27
prev parent reply other threads:[~2011-09-28 13:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-27 17:54 [PATCH 1/3] git-remote-mediawiki: trivial fixes Matthieu Moy
2011-09-27 17:54 ` [PATCH 2/3] git-remote-mediawiki: set 'basetimestamp' to let the wiki handle conflicts Matthieu Moy
2011-09-27 17:55 ` [PATCH 3/3] git-remote-mediawiki: obey advice.pushNonFastForward Matthieu Moy
2011-09-28 13:48 ` Matthieu Moy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1317217681-18763-1-git-send-email-Matthieu.Moy@imag.fr \
--to=matthieu.moy@imag.fr \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).