1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/mastodon_ynh.git synced 2024-09-03 19:46:02 +02:00
This commit is contained in:
Tagadda 2023-07-19 23:41:16 +02:00 committed by Félix Piédallu
parent 8003baea29
commit 000b065e1e
4 changed files with 34 additions and 1 deletions

View file

@ -86,7 +86,7 @@ S3_ENABLED=false
# IP and session retention
# -----------------------
LDAP_ENABLED=true
LDAP_ENABLED=__ENABLE_LDAP__
LDAP_HOST=localhost
LDAP_PORT=389
LDAP_METHOD=start_tls

17
config_panel.toml Normal file
View file

@ -0,0 +1,17 @@
version = "1.0"
[main]
services = ["__APP__-web","__APP__-sidekiq","__APP__-streaming"]
[main.misc]
optional = false
[main.misc.enable_ldap]
ask.en = "Enable LDAP integration"
ask.fr = "Activer l'intégration LDAP"
help.en = "If enabled, YunoHost users will be able to log in"
help.fr = "Une fois activé, les utilisateurs YunoHost pourront s'authentifier dans Mastodon"
type = "boolean"
bind = "LDAP_ENABLED:__INSTALL_DIR__/.env.production"
yes = "true"
no = "false"

View file

@ -49,6 +49,16 @@ ram.runtime = "500M"
[install.admin]
type = "user"
[install.enable_ldap]
ask.en = "Enable LDAP integration"
ask.fr = "Activer l'intégration LDAP"
help.en = "If enabled, YunoHost users will be able to log in"
help.fr = "Une fois activé, les utilisateurs YunoHost pourront s'authentifier dans Mastodon"
type = "boolean"
default = true
yes = "true"
no = "false"
[resources]
[resources.sources]
[resources.sources.main]

View file

@ -40,6 +40,12 @@ if [[ -z "${service:-}" ]]; then
ynh_app_setting_set --app="$app" --key=service --value="$service"
fi
# If enable_ldap doesn't exist, create it
if [[ -z "$enable_ldap" ]]; then
enable_ldap="true"
ynh_app_settings_set --app=$app --key=enable_ldap --value=$enable_ldap
fi
# Remove previous added repository
ynh_remove_extra_repo