From 1a76bbcbc8f7f9df420421066cf876e1f99a1623 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 2 Oct 2013 19:28:00 +0200 Subject: [PATCH] Add templates for bootstrap.json, which replace the old bootstrap_plugins.php file --- createlinks | 1 + .../plugins/boot.conf/bootstrap.json/10All | 58 ++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 root/etc/e-smith/templates/var/lib/ajaxplorer/plugins/boot.conf/bootstrap.json/10All diff --git a/createlinks b/createlinks index 15f0b48..6ff016b 100644 --- a/createlinks +++ b/createlinks @@ -35,3 +35,4 @@ event_link("ajaxplorer-user-rights", "user-modify-admin", "85"); safe_touch("root/etc/e-smith/templates/var/lib/ajaxplorer/plugins/auth.serial/roles.ser/template-begin"); safe_touch("root/etc/e-smith/templates/var/lib/ajaxplorer/plugins/auth.serial/users.ser/template-begin"); safe_touch("root/etc/e-smith/templates/var/lib/ajaxplorer/plugins/conf.serial/plugins_configs.ser/template-begin"); +safe_touch("root/etc/e-smith/templates/var/lib/ajaxplorer/plugins/boot.conf/bootstrap.json/template-begin"); diff --git a/root/etc/e-smith/templates/var/lib/ajaxplorer/plugins/boot.conf/bootstrap.json/10All b/root/etc/e-smith/templates/var/lib/ajaxplorer/plugins/boot.conf/bootstrap.json/10All new file mode 100644 index 0000000..909084d --- /dev/null +++ b/root/etc/e-smith/templates/var/lib/ajaxplorer/plugins/boot.conf/bootstrap.json/10All @@ -0,0 +1,58 @@ +{ +use JSON; + +my $data = { + 'core.conf' => { + 'USERS_LIST_COMPLETE_MIN_CHARS' => '3', + 'SKIP_USER_HISTORY' => JSON::PP::true, + 'DIBI_PRECONFIGURATION' => { + 'mysql_username' => $dbu, + 'mysql_password' => $dbpw, + 'mysql_driver' => 'mysql', + 'group_switch_value' => 'mysql', + 'mysql_database' => $dbn, + 'mysql_host' => 'localhost' + }, + 'UNIQUE_INSTANCE_CONFIG' => { + 'FAST_CHECKS' => JSON::PP::true, + 'ROLES_FILEPATH' => '/var/lib/ajaxplorer/plugins/auth.serial/roles.ser', + 'USERS_DIRPATH' => '/var/lib/ajaxplorer/plugins/auth.serial', + 'instance_name' => 'conf.serial', + 'group_switch_value' => 'conf.serial', + 'REPOSITORIES_FILEPATH' => '/var/lib/ajaxplorer/plugins/conf.serial/repo.ser' + }, + 'USER_CREATE_REPOSITORY' => JSON::PP::false, + 'SAVE_GUEST_PREFERENCES' => JSON::PP::false, + 'USERS_LIST_HIDE_LOGIN' => JSON::PP::false, + 'USERS_LIST_COMPLETE_LIMIT' => '20', + 'ALLOW_CROSSUSERS_SHARING' => JSON::PP::true, + }, + 'core.auth' => { + 'MASTER_INSTANCE_CONFIG' => { + 'LOGOUT_URL' => 'https://auth.' . $DomainName, + 'LOGIN_REDIRECT' => '', + 'instance_name' => 'auth.basic_http', + 'AJXP_ADMIN_LOGIN' => '', + 'TRANSMIT_CLEAR_PASS' => JSON::PP::true, + 'AUTOCREATE_AJXPUSER' => JSON::PP::false, + 'group_switch_value' => 'auth.basic_http', + 'USERS_FILEPATH' => '/var/lib/ajaxplorer/plugins/auth.serial/users.ser' + }, + 'SLAVE_INSTANCE_CONFIG_group_switch' => '', + 'SLAVE_INSTANCE_CONFIG' => [], + 'SECURE_LOGIN_FORM' => JSON::PP::false, + 'SESSION_SET_CREDENTIALS' => JSON::PP::false, + 'MULTI_MODE' => { + 'instance_name' => 'MASTER_SLAVE', + 'group_switch_value' => 'MASTER_SLAVE' + }, + 'CASE_SENSITIVE' => JSON::PP::true, + 'ENABLE_USERS' => JSON::PP::true, + 'ALLOW_GUEST_BROWSING' => JSON::PP::false, + 'MULTI_USER_BASE_DRIVER' => '', + 'PASSWORD_MINLENGTH' => '8' + } + }; + +$OUT = to_json($data); +}