1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

Merge pull request #680 from YunoHost-Apps/config-addressbook

Make system address book access configurable
This commit is contained in:
eric_G 2024-04-09 20:11:04 +02:00 committed by GitHub
commit 1f57fdb61c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 96 additions and 2 deletions

View file

@ -1,6 +1,6 @@
# All available README files by language # All available README files by language
- [Read the README in English](README.md) - [Read the README in English](README.md)
- [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md) - [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md) - [Le o README en galego](README_gl.md)
- [Leggi il “README” in italiano](README_it.md)

View file

@ -9,7 +9,7 @@ It shall NOT be edited by hand.
[![Install Nextcloud with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud) [![Install Nextcloud with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud)
*[Read this README is other languages.](./ALL_README.md)* *[Read this README in other languages.](./ALL_README.md)*
> *This package allows you to install Nextcloud quickly and simply on a YunoHost server.* > *This package allows you to install Nextcloud quickly and simply on a YunoHost server.*
> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* > *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*

61
README_eu.md Normal file
View file

@ -0,0 +1,61 @@
<!--
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
EZ editatu eskuz.
-->
# Nextcloud YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/nextcloud.svg)](https://dash.yunohost.org/appci/app/nextcloud) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/nextcloud.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/nextcloud.maintain.svg)
[![Instalatu Nextcloud YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=nextcloud)
*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
> *Pakete honek Nextcloud YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
## Aurreikuspena
Nextcloud Hub is a fully open-source on-premises content collaboration platform. Teams access, share and edit their documents, chat and participate in video calls and manage their mail and calendar and projects across mobile, desktop and web interfaces.
### YunoHost-specific features
In addition to Nextcloud core features, the following are made available with this package:
* Integrate with YunoHost users and SSO - i.e. logout button
* Allow one user to be the administrator (set at the installation)
* Allow multiple instances of this application
* Optionally access the user home folder from Nextcloud files (set at the installation, the sharing is enabled by default)
* Serve `/.well-known` paths for CalDAV and CardDAV on the domain only if it's not already served - i.e. by Baïkal
**Paketatutako bertsioa:** 28.0.4~ynh1
**Demoa:** <https://demo.nextcloud.com/>
## Pantaila-argazkiak
![Nextcloud(r)en pantaila-argazkia](./doc/screenshots/screenshot.png)
## Dokumentazioa eta baliabideak
- Aplikazioaren webgune ofiziala: <https://nextcloud.com>
- Erabiltzaileen dokumentazio ofiziala: <https://docs.nextcloud.com/server/latest/user_manual/en/>
- Administratzaileen dokumentazio ofiziala: <https://docs.nextcloud.com/server/stable/admin_manual/>
- Jatorrizko aplikazioaren kode-gordailua: <https://github.com/nextcloud/server>
- YunoHost Denda: <https://apps.yunohost.org/app/nextcloud>
- Eman errore baten berri: <https://github.com/YunoHost-Apps/nextcloud_ynh/issues>
## Garatzaileentzako informazioa
Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing).
`testing` abarra probatzeko, ondorengoa egin:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing --debug
edo
sudo yunohost app upgrade nextcloud -u https://github.com/YunoHost-Apps/nextcloud_ynh/tree/testing --debug
```
**Informazio gehiago aplikazioaren paketatzeari buruz:** <https://yunohost.org/packaging_apps>

View file

@ -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"

View file

@ -54,6 +54,13 @@ 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"]
default = "yes"
[resources] [resources]
[resources.sources] [resources.sources]

View file

@ -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

View file

@ -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
#================================================= #=================================================