From 8b582e3021ce374fc75825141801a5baa4b249c1 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 20 Dec 2013 13:48:56 +0100 Subject: [PATCH] Enable Authwebserver on a default install. This needs to be done in the database now that auth is handled by plugins --- root/etc/e-smith/templates/etc/e-smith/sql/init/limesurvey | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/limesurvey b/root/etc/e-smith/templates/etc/e-smith/sql/init/limesurvey index 55c43d1..057aa8a 100644 --- a/root/etc/e-smith/templates/etc/e-smith/sql/init/limesurvey +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/limesurvey @@ -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 }