1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/limesurvey_ynh.git synced 2024-09-03 19:36:32 +02:00

[fix] Force SSL + ajust permission

This commit is contained in:
ljf 2022-01-14 02:31:12 +01:00
parent 9f8a731f01
commit 368ec84d67
3 changed files with 21 additions and 21 deletions

View file

@ -64,6 +64,7 @@ return array(
// 'force_xmlsettings_for_survey_rendering' => true, // Uncomment if you want to force the use of the XML file rather than DB (for easy theme development) // 'force_xmlsettings_for_survey_rendering' => true, // Uncomment if you want to force the use of the XML file rather than DB (for easy theme development)
// 'use_asset_manager'=>true, // Uncomment if you want to use debug mode and asset manager at the same time // 'use_asset_manager'=>true, // Uncomment if you want to use debug mode and asset manager at the same time
'enableLdap' => true, 'enableLdap' => true,
'force_ssl' => true,
'uploaddir' => '__DATADIR__' 'uploaddir' => '__DATADIR__'
) )
); );

View file

@ -17,7 +17,7 @@ INSERT INTO `lime_plugin_settings` (`id`, `plugin_id`, `model`, `model_id`, `key
(9, 5, NULL, NULL, 'domainsuffix', 'null'), (9, 5, NULL, NULL, 'domainsuffix', 'null'),
(10, 5, NULL, NULL, 'searchuserattribute', '\"uid\"'), (10, 5, NULL, NULL, 'searchuserattribute', '\"uid\"'),
(11, 5, NULL, NULL, 'usersearchbase', '\"ou=users,dc=yunohost,dc=org\"'), (11, 5, NULL, NULL, 'usersearchbase', '\"ou=users,dc=yunohost,dc=org\"'),
(12, 5, NULL, NULL, 'extrauserfilter', '\"(&(|(objectclass=posixAccount))(uid=%uid)(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))\"'), (12, 5, NULL, NULL, 'extrauserfilter', '\"(&(objectClass=inetOrgPerson)(permission=cn=__APP__.admin,ou=permission,dc=yunohost,dc=org))\"'),
(13, 5, NULL, NULL, 'binddn', '\"\"'), (13, 5, NULL, NULL, 'binddn', '\"\"'),
(14, 5, NULL, NULL, 'bindpwd', '\"\"'), (14, 5, NULL, NULL, 'bindpwd', '\"\"'),
(15, 5, NULL, NULL, 'mailattribute', '\"mail\"'), (15, 5, NULL, NULL, 'mailattribute', '\"mail\"'),
@ -25,8 +25,8 @@ INSERT INTO `lime_plugin_settings` (`id`, `plugin_id`, `model`, `model_id`, `key
(17, 5, NULL, NULL, 'is_default', '\"\"'), (17, 5, NULL, NULL, 'is_default', '\"\"'),
(18, 5, NULL, NULL, 'autocreate', '\"1\"'), (18, 5, NULL, NULL, 'autocreate', '\"1\"'),
(19, 5, NULL, NULL, 'automaticsurveycreation', '\"1\"'), (19, 5, NULL, NULL, 'automaticsurveycreation', '\"1\"'),
(20, 5, NULL, NULL, 'groupsearchbase', '\"ou=groups,dc=yunohost,dc=org\"'), (20, 5, NULL, NULL, 'groupsearchbase', '\"\"'),
(21, 5, NULL, NULL, 'groupsearchfilter', '\"(&(objectclass=top)(memberUid=*))\"'), (21, 5, NULL, NULL, 'groupsearchfilter', '\"\"'),
(22, 5, NULL, NULL, 'allowInitialUser', '\"1\"'); (22, 5, NULL, NULL, 'allowInitialUser', '\"1\"');
@ -35,7 +35,6 @@ INSERT INTO `lime_plugin_settings` (`id`, `plugin_id`, `model`, `model_id`, `key
#(24, 7, NULL, NULL, 'serverkey', '"REMOTE_USER"'), #(24, 7, NULL, NULL, 'serverkey', '"REMOTE_USER"'),
#(25, 7,NULL,NULL,'is_default','\"1\"'); #(25, 7,NULL,NULL,'is_default','\"1\"');
INSERT INTO `lime_settings_global` VALUESi INSERT INTO `lime_settings_global` VALUES
('defaultlang','__LANGUAGE__'), ('defaultlang','__LANGUAGE__'),
('AssetsVersion','30214'), ('AssetsVersion','30214');
('DBVersion', 449);

View file

@ -90,7 +90,7 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path" chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path" chown -R $app:www-data "$final_path"
chmod 750 "$final_path/tmp" chmod 750 "$final_path/tmp"
chmod 750 "$data_dir/upload" chmod 750 "$final_path/upload"
chmod 750 "$final_path/application/config/" chmod 750 "$final_path/application/config/"
#================================================= #=================================================
@ -111,13 +111,6 @@ ynh_add_fpm_config
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
#=================================================
# CONFIGURE
#=================================================
ynh_script_progression --message="Configuring Limesurvey..." --weight=1
ynh_add_config --template="../conf/config.php" --destination="$final_path/application/config/config.php"
#================================================= #=================================================
# CREATE THE DATA DIRECTORY # CREATE THE DATA DIRECTORY
#================================================= #=================================================
@ -130,6 +123,13 @@ mv "$final_path/upload" $datadir/upload
chown -R $app:www-data "$datadir" chown -R $app:www-data "$datadir"
chmod -R o-rwx "$datadir" chmod -R o-rwx "$datadir"
#=================================================
# CONFIGURE
#=================================================
ynh_script_progression --message="Configuring Limesurvey..." --weight=1
ynh_add_config --template="../conf/config.php" --destination="$final_path/application/config/config.php"
#================================================= #=================================================
# INSTALL # INSTALL
#================================================= #=================================================
@ -175,13 +175,13 @@ ynh_script_progression --message="Configuring permissions..." --weight=1
if [ $is_public -eq 1 ] if [ $is_public -eq 1 ]
then then
allowed_groups="visitors" allowed_groups="visitors $admin"
else else
allowed_groups="$admin" allowed_groups="$admin"
fi fi
ynh_permission_update --permission="main" --url="/admin" --allowed="$allowed_groups" ynh_permission_update --permission="main" --show_tile="false" --add="visitors"
ynh_permission_create --permission="answer" --url="/" --allowed="visitors" --show_tile="false" ynh_permission_create --permission="admin" --url="/admin" --allowed=$allowed_groups --show_tile="true"
#================================================= #=================================================