Skip to content

Commit 1d6abac

Browse files
moygitster
authored andcommitted
git-remote-mediawiki: allow a domain to be set for authentication
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fd47d7b commit 1d6abac

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

contrib/mw-to-git/git-remote-mediawiki

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,10 @@ my $wiki_login = run_git("config --get remote.". $remotename .".mwLogin");
7676
# inside a remote helper, so our stdin is connect to git, not to a
7777
# terminal.
7878
my $wiki_passwd = run_git("config --get remote.". $remotename .".mwPassword");
79+
my $wiki_domain = run_git("config --get remote.". $remotename .".mwDomain");
7980
chomp($wiki_login);
8081
chomp($wiki_passwd);
82+
chomp($wiki_domain);
8183

8284
# Import only last revisions (both for clone and fetch)
8385
my $shallow_import = run_git("config --get --bool remote.". $remotename .".shallow");
@@ -158,6 +160,7 @@ sub mw_connect_maybe {
158160
if (!$mediawiki->login({
159161
lgname => $wiki_login,
160162
lgpassword => $wiki_passwd,
163+
lgdomain => $wiki_domain,
161164
})) {
162165
print STDERR "Failed to log in mediawiki user \"$wiki_login\" on $url\n";
163166
print STDERR "(error " .

0 commit comments

Comments
 (0)