mirror of
https://github.com/YunoHost-Apps/mediawiki_ynh.git
synced 2024-09-03 19:46:05 +02:00
Add Auth_Remote extension for autologin
This commit is contained in:
parent
45f3eddba2
commit
3413a192db
2 changed files with 22 additions and 0 deletions
|
@ -157,3 +157,17 @@ $wgLDAPPreferences = array(
|
|||
);
|
||||
|
||||
$wgLDAPDebug = 0;
|
||||
|
||||
|
||||
#RemoteUser
|
||||
require_once 'extensions/Auth_remoteuser/Auth_remoteuser.php';
|
||||
$wgAuth = new Auth_remoteuser();
|
||||
|
||||
$wgAuthRemoteuserAuthz = true;
|
||||
$wgAuthRemoteuserName = $_SERVER["AUTHENTICATE_CN"];
|
||||
$wgAuthRemoteuserMail = $_SERVER["AUTHENTICATE_MAIL"];
|
||||
|
||||
// Don't let anonymous people do things...
|
||||
$wgGroupPermissions['*']['createaccount'] = false;
|
||||
$wgGroupPermissions['*']['read'] = false;
|
||||
$wgGroupPermissions['*']['edit'] = false;
|
||||
|
|
|
@ -38,6 +38,14 @@ sudo mv wikimedia-mediawiki-extensions-LdapAuthentication*/* $final_path/extensi
|
|||
sudo rm -R wikimedia-mediawiki-extensions-LdapAuthentication*
|
||||
sudo rm REL1_22
|
||||
|
||||
# RemoteUser Extension
|
||||
sudo wget https://codeload.github.com/wikimedia/mediawiki-extensions-Auth_remoteuser/legacy.tar.gz/REL1_22
|
||||
sudo tar -xzf REL1_22
|
||||
sudo mkdir $final_path/extensions/Auth_remoteuser
|
||||
sudo mv wikimedia-mediawiki-extensions-Auth_remoteuser*/* $final_path/extensions/Auth_remoteuser/
|
||||
sudo rm -R wikimedia-mediawiki-extensions-Auth_remoteuser*
|
||||
sudo rm REL1_22
|
||||
|
||||
# Change variables in Mediawiki configuration
|
||||
sudo sed -i "s/ynh_wiki_name/$wiki_name/g" $final_path/LocalSettings.php
|
||||
sudo sed -i "s@ynh_wiki_path@$path@g" $final_path/LocalSettings.php
|
||||
|
|
Loading…
Add table
Reference in a new issue