Enable Authwebserver on a default install. This needs to be done in the database now that auth is handled by plugins

This commit is contained in:
Daniel Berteaud 2013-12-20 13:48:56 +01:00
parent 2c325ed23a
commit 8b582e3021
1 changed files with 11 additions and 0 deletions

View File

@ -42,6 +42,17 @@ REPLACE INTO db (
'N', 'Y', 'Y');
FLUSH PRIVILEGES;
use $db;
ALTER TABLE plugins ADD CONSTRAINT uniq_name UNIQUE(\\`name\\`);
INSERT into plugins (\\`name\\`,\\`active\\`) VALUES ('Authwebserver','1') ON DUPLICATE KEY UPDATE active=1;
ALTER TABLE plugins DROP INDEX uniq_name;
ALTER TABLE plugin_settings ADD CONSTRAINT uniq_plugin UNIQUE (\\`plugin_id\\`,\\`key\\`);
INSERT INTO plugin_settings (\\`plugin_id\\`,\\`key\\`,\\`value\\`) VALUES ((SELECT id from plugins where name='Authwebserver'),'strip_domain', NULL) ON DUPLICATE KEY update value=NULL;
INSERT INTO plugin_settings (\\`plugin_id\\`,\\`key\\`,\\`value\\`) VALUES ((SELECT id from plugins where name='Authwebserver'),'serverkey', '"REMOTE_USER"') ON DUPLICATE KEY update value='"REMOTE_USER"';
ALTER TABLE plugin_settings DROP INDEX uniq_plugin;
EOF
END
}