|
|
@ -8,72 +8,57 @@ my $url = $pydio{'LogoutUrl'} || ''; |
|
|
|
my $createUser = $pydio{'ShareCreateUser'} || 'disabled'; |
|
|
|
my $createUser = $pydio{'ShareCreateUser'} || 'disabled'; |
|
|
|
$createUser = ($createUser eq 'enabled') ? JSON::true : JSON::false; |
|
|
|
$createUser = ($createUser eq 'enabled') ? JSON::true : JSON::false; |
|
|
|
|
|
|
|
|
|
|
|
my $data = { |
|
|
|
my $data; |
|
|
|
'core.conf' => { |
|
|
|
|
|
|
|
'USERS_LIST_COMPLETE_MIN_CHARS' => '3', |
|
|
|
if ((($pydio->prop('ManualConf') || 'disabled') eq 'enabled') && open CONF, "/var/lib/pydio/plugins/conf.serial/boot.conf/bootstrap.json"){ |
|
|
|
'SKIP_USER_HISTORY' => JSON::true, |
|
|
|
$data = <CONF>; |
|
|
|
'DIBI_PRECONFIGURATION' => { |
|
|
|
close CONF; |
|
|
|
'mysql_username' => $dbu, |
|
|
|
$data = from_json($data); |
|
|
|
'mysql_password' => $dbp, |
|
|
|
|
|
|
|
'mysql_driver' => 'mysql', |
|
|
|
|
|
|
|
'group_switch_value' => 'mysql', |
|
|
|
|
|
|
|
'mysql_database' => $dbn, |
|
|
|
|
|
|
|
'mysql_host' => 'localhost' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
'UNIQUE_INSTANCE_CONFIG' => { |
|
|
|
|
|
|
|
'FAST_CHECKS' => JSON::false, |
|
|
|
|
|
|
|
'ROLES_FILEPATH' => '/var/lib/pydio/plugins/auth.serial/roles.ser', |
|
|
|
|
|
|
|
'USERS_DIRPATH' => '/var/lib/pydio/plugins/auth.serial', |
|
|
|
|
|
|
|
'instance_name' => 'conf.serial', |
|
|
|
|
|
|
|
'group_switch_value' => 'conf.serial', |
|
|
|
|
|
|
|
'REPOSITORIES_FILEPATH' => '/var/lib/pydio/plugins/conf.serial/repo.ser' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
'USER_CREATE_REPOSITORY' => JSON::false, |
|
|
|
|
|
|
|
'SAVE_GUEST_PREFERENCES' => JSON::false, |
|
|
|
|
|
|
|
'USERS_LIST_HIDE_LOGIN' => JSON::false, |
|
|
|
|
|
|
|
'USERS_LIST_COMPLETE_LIMIT' => '20', |
|
|
|
|
|
|
|
'ALLOW_CROSSUSERS_SHARING' => JSON::true, |
|
|
|
|
|
|
|
'USER_CREATE_USERS' => $createUser |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
'core.auth' => { |
|
|
|
|
|
|
|
'MASTER_INSTANCE_CONFIG' => { |
|
|
|
|
|
|
|
'LOGOUT_URL' => $url, |
|
|
|
|
|
|
|
'LOGIN_REDIRECT' => '', |
|
|
|
|
|
|
|
'instance_name' => 'auth.basic_http', |
|
|
|
|
|
|
|
'AJXP_ADMIN_LOGIN' => '', |
|
|
|
|
|
|
|
'TRANSMIT_CLEAR_PASS' => JSON::true, |
|
|
|
|
|
|
|
'AUTOCREATE_AJXPUSER' => JSON::false, |
|
|
|
|
|
|
|
'group_switch_value' => 'auth.basic_http', |
|
|
|
|
|
|
|
'USERS_FILEPATH' => '/var/lib/pydio/plugins/auth.serial/users.ser' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
'MULTI_MODE' => { |
|
|
|
|
|
|
|
'instance_name' => 'MASTER_SLAVE', |
|
|
|
|
|
|
|
'CACHE_MASTER_USERS_TO_SLAVE' => JSON::false, |
|
|
|
|
|
|
|
'group_switch_value' => 'MASTER_SLAVE' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
'MULTI_USER_BASE_DRIVER' => 'slave', |
|
|
|
|
|
|
|
'SLAVE_INSTANCE_CONFIG' => { |
|
|
|
|
|
|
|
'instance_name' => 'auth.serial', |
|
|
|
|
|
|
|
'USERS_FILEPATH' => '/var/lib/pydio/plugins/auth.serial/guests.ser', |
|
|
|
|
|
|
|
'TRANSMIT_CLEAR_PASS' => JSON::true, |
|
|
|
|
|
|
|
'LOGIN_REDIRECT' => '', |
|
|
|
|
|
|
|
'FAST_CHECKS' => JSON::false, |
|
|
|
|
|
|
|
'AUTOCREATE_AJXPUSER' => JSON::false, |
|
|
|
|
|
|
|
'AJXP_ADMIN_LOGIN' => '', |
|
|
|
|
|
|
|
'group_switch_value' => 'auth.serial' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
'SECURE_LOGIN_FORM' => JSON::false, |
|
|
|
|
|
|
|
'SESSION_SET_CREDENTIALS' => JSON::false, |
|
|
|
|
|
|
|
'MULTI_MODE' => { |
|
|
|
|
|
|
|
'instance_name' => 'MASTER_SLAVE', |
|
|
|
|
|
|
|
'group_switch_value' => 'MASTER_SLAVE' |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
'CASE_SENSITIVE' => JSON::true, |
|
|
|
|
|
|
|
'ENABLE_USERS' => JSON::true, |
|
|
|
|
|
|
|
'ALLOW_GUEST_BROWSING' => JSON::false, |
|
|
|
|
|
|
|
'PASSWORD_MINLENGTH' => '4' |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
$data->{'core.conf'}->{'USERS_LIST_COMPLETE_MIN_CHARS'} ||= '3'; |
|
|
|
|
|
|
|
$data->{'core.conf'}->{'SKIP_USER_HISTORY'} ||= JSON::true; |
|
|
|
|
|
|
|
$data->{'core.conf'}->{'USER_CREATE_REPOSITORY'} ||= JSON::false; |
|
|
|
|
|
|
|
$data->{'core.conf'}->{'SAVE_GUEST_PREFERENCES'} ||= JSON::false; |
|
|
|
|
|
|
|
$data->{'core.conf'}->{'USERS_LIST_HIDE_LOGIN'} ||= JSON::false; |
|
|
|
|
|
|
|
$data->{'core.conf'}->{'USERS_LIST_COMPLETE_LIMIT'} ||= '20'; |
|
|
|
|
|
|
|
$data->{'core.conf'}->{'ALLOW_CROSSUSERS_SHARING'} ||= JSON::true; |
|
|
|
|
|
|
|
$data->{'core.conf'}->{'USER_CREATE_USERS'} ||= $createUser; |
|
|
|
|
|
|
|
$data->{'core.conf'}->{'DIBI_PRECONFIGURATION'}->{'mysql_username'} ||= $dbu; |
|
|
|
|
|
|
|
$data->{'core.conf'}->{'DIBI_PRECONFIGURATION'}->{'mysql_password'} ||= $dbp; |
|
|
|
|
|
|
|
$data->{'core.conf'}->{'DIBI_PRECONFIGURATION'}->{'mysql_driver'} ||= 'mysql'; |
|
|
|
|
|
|
|
$data->{'core.conf'}->{'DIBI_PRECONFIGURATION'}->{'group_switch_value'} ||= 'mysql'; |
|
|
|
|
|
|
|
$data->{'core.conf'}->{'DIBI_PRECONFIGURATION'}->{'mysql_database'} ||= $dbn; |
|
|
|
|
|
|
|
$data->{'core.conf'}->{'DIBI_PRECONFIGURATION'}->{'mysql_host'} ||= 'localhost'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'LOGOUT_URL'} ||= $url; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'LOGIN_REDIRECT'} ||= ''; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'instance_name'} ||= 'auth.basic_http'; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'AJXP_ADMIN_LOGIN'} ||= ''; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'TRANSMIT_CLEAR_PASS'} ||= JSON::true; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'AUTOCREATE_AJXPUSER'} ||= JSON::false; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'group_switch_value'} ||= 'auth.basic_http'; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MASTER_INSTANCE_CONFIG'}->{'USERS_FILEPATH'} ||= '/var/lib/pydio/plugins/auth.serial/users.ser'; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MULTI_MODE'}->{'instance_name'} ||= 'MASTER_SLAVE'; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MULTI_MODE'}->{'CACHE_MASTER_USERS_TO_SLAVE'} ||= JSON::false; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MULTI_MODE'}->{'group_switch_value'} ||= 'MASTER_SLAVE'; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MULTI_USER_BASE_DRIVER'} ||= 'slave'; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'instance_name'} ||= 'auth.serial'; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'USERS_FILEPATH'} ||= '/var/lib/pydio/plugins/auth.serial/guests.ser'; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'TRANSMIT_CLEAR_PASS'} ||= JSON::true; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'LOGIN_REDIRECT'} ||= ''; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'FAST_CHECKS'} ||= JSON::false; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'AUTOCREATE_AJXPUSER'} ||= JSON::false; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'AJXP_ADMIN_LOGIN'} ||= ''; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'SLAVE_INSTANCE_CONFIG'}->{'group_switch_value'} ||= 'auth.serial'; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'SECURE_LOGIN_FORM'} ||= JSON::false; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'SESSION_SET_CREDENTIALS'} ||= JSON::false; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MULTI_MODE'}->{'instance_name'} ||= 'MASTER_SLAVE'; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'MULTI_MODE'}->{'group_switch_value'} ||= 'MASTER_SLAVE'; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'CASE_SENSITIVE'} ||= JSON::true; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'ENABLE_USERS'} ||= JSON::true; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'ALLOW_GUEST_BROWSING'} ||= JSON::false; |
|
|
|
|
|
|
|
$data->{'core.auth'}->{'PASSWORD_MINLENGTH'} ||= '4'; |
|
|
|
|
|
|
|
|
|
|
|
$OUT = to_json($data, {pretty => 1}); |
|
|
|
$OUT = to_json($data, {pretty => 1}); |
|
|
|
} |
|
|
|
} |
|
|
|