mirror of
https://github.com/YunoHost-Apps/nextcloud_ynh.git
synced 2024-09-03 19:55:57 +02:00
Make system address book access configurable
This commit is contained in:
parent
ee3b9fd9fb
commit
ee0a22caba
4 changed files with 32 additions and 0 deletions
|
@ -11,6 +11,15 @@ name = "Nextcloud configuration"
|
||||||
type = "boolean"
|
type = "boolean"
|
||||||
default = "0"
|
default = "0"
|
||||||
|
|
||||||
|
[main.addressbook]
|
||||||
|
name = "Address book configuration"
|
||||||
|
|
||||||
|
[main.addressbook.system_addressbook_exposed]
|
||||||
|
ask = "Should there be a system address book listing all users, accessible by all users?"
|
||||||
|
type = "boolean"
|
||||||
|
yes = "yes"
|
||||||
|
no = "no"
|
||||||
|
|
||||||
[main.php_fpm_config]
|
[main.php_fpm_config]
|
||||||
name = "PHP-FPM configuration"
|
name = "PHP-FPM configuration"
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,12 @@ ram.runtime = "512M"
|
||||||
type = "boolean"
|
type = "boolean"
|
||||||
default = false
|
default = false
|
||||||
|
|
||||||
|
[install.system_addressbook_exposed]
|
||||||
|
ask.en = "Should there be a system address book listing all users, accessible by all users?"
|
||||||
|
ask.fr = "Devrait-il y avoir un carnet d'adresses système listant tous les comptes, accessible par tous les comptes ?"
|
||||||
|
type = "select"
|
||||||
|
choices = ["yes", "no"]
|
||||||
|
|
||||||
[resources]
|
[resources]
|
||||||
|
|
||||||
[resources.sources]
|
[resources.sources]
|
||||||
|
|
|
@ -38,6 +38,11 @@ get__maintenance_mode() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get__system_addressbook_exposed() {
|
||||||
|
echo $(cd "$install_dir" && ynh_exec_as "$app" \
|
||||||
|
php${phpversion} --define apc.enable_cli=1 occ config:app:get dav system_addressbook_exposed)
|
||||||
|
}
|
||||||
|
|
||||||
get__fpm_footprint() {
|
get__fpm_footprint() {
|
||||||
# Free footprint value for php-fpm
|
# Free footprint value for php-fpm
|
||||||
# Check if current_fpm_footprint is an integer
|
# Check if current_fpm_footprint is an integer
|
||||||
|
@ -80,6 +85,12 @@ set__maintenance_mode() {
|
||||||
ynh_app_setting_set --app=$app --key=maintenance_mode --value="$maintenance_mode"
|
ynh_app_setting_set --app=$app --key=maintenance_mode --value="$maintenance_mode"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set__system_addressbook_exposed() {
|
||||||
|
(cd "$install_dir" && ynh_exec_as "$app" \
|
||||||
|
php${phpversion} --define apc.enable_cli=1 occ config:app:set dav system_addressbook_exposed --value="$system_addressbook_exposed")
|
||||||
|
ynh_print_info "System addressbook is exposed: $system_addressbook_exposed"
|
||||||
|
}
|
||||||
|
|
||||||
set__fpm_footprint() {
|
set__fpm_footprint() {
|
||||||
if [ "$fpm_footprint" != "specific" ]
|
if [ "$fpm_footprint" != "specific" ]
|
||||||
then
|
then
|
||||||
|
|
|
@ -180,6 +180,12 @@ ynh_mysql_connect_as --user=$db_name --password="$db_pwd" --database=$db_name --
|
||||||
# And delete admin user
|
# And delete admin user
|
||||||
exec_occ user:delete admin
|
exec_occ user:delete admin
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# ENABLE OR DISABLE SYSTEM ADDRESS BOOK
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
exec_occ config:app:set dav system_addressbook_exposed --value="$system_addressbook_exposed"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE THE CHECKSUM OF THE CONFIG FILE
|
# STORE THE CHECKSUM OF THE CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue