1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yeswiki_ynh.git synced 2024-09-03 18:05:56 +02:00

WIP for CLIC

This commit is contained in:
Douze Bé 2024-05-24 14:28:39 +02:00
parent e6de2ad134
commit 574260415b
3 changed files with 26 additions and 11 deletions

2
conf/sudoers Normal file
View file

@ -0,0 +1,2 @@
{{ app }} ALL = (root) NOPASSWD: {{ install_dir }}/tools/yunohost/private/scripts/yunohost-user-info.sh
{{ app }} ALL = (root) NOPASSWD: {{ install_dir }}/tools/yunohost/private/scripts/yunohost-app-list.sh

View file

@ -58,8 +58,8 @@ default = "YesWiki"
ask.en = "Choose the authentification type"
ask.fr = "Choisissez le système d'authentification"
type = "select"
choices = ["Yunohost LDAP", "YesWiki"]
default = "Yunohost LDAP"
choices = ["Yunohost SSO", "YesWiki"]
default = "Yunohost SSO"
[install.admin]
type = "user"
@ -82,6 +82,10 @@ autoupdate.strategy = "latest_github_tag"
url = "https://repository.yeswiki.net/doryphore/extension-loginldap-1.0.0.zip"
sha256 = "28c9489e4fb0c83e0e775d80a1d07cbc3fbf56d42ab550b45571455f1a6ce9f9"
[resources.sources.yunohostplugin]
url = "https://repository.yeswiki.net/doryphore/extension-yunohost-1.0.0.zip"
sha256 = ""
[resources.sources.ferme]
url = "https://repository.yeswiki.net/doryphore/extension-ferme-1.1.8.zip"
sha256 = "e83a21eaa911b7beb2d845a16c896b2d4d4db2a9d5d2dfca8f0b7c910a329203"

View file

@ -72,20 +72,29 @@ fi
# (kind of strange, should be doable using the previous curl?)
ynh_replace_string --match_string="'allow_raw_html' => false," --replace_string="'allow_raw_html' => true," --target_file="$install_dir/wakka.config.php"
if [ "${authprovider}" = "Yunohost LDAP" ]; then
if [ "${authprovider}" = "Yunohost SSO" ]; then
#=================================================
# DOWNLOAD AND CONFIGURE LDAP PLUGIN
# DOWNLOAD AND CONFIGURE YUNOHOST PLUGIN
#=================================================
ynh_script_progression --message="Configure LDAP plugin" --weight=2
ynh_script_progression --message="Configure yunohost plugin" --weight=2
# Download LDAP plugin from yeswiki repository
mkdir -p "$install_dir/tools/loginldap"
ynh_setup_source --dest_dir="$install_dir/tools/loginldap" --source_id="loginldap"
# Download yeswiki plugin from yeswiki repository
mkdir -p "$install_dir/tools/yunohost"
ynh_setup_source --dest_dir="$install_dir/tools/yunohost" --source_id="yunohostplugin"
# Add config at the end of wakka.config.php
ynh_replace_string --match_string=");" --replace_string=" 'ldap_host' => '127.0.0.1',\n);" --target_file="$install_dir/wakka.config.php"
ynh_replace_string --match_string=");" --replace_string=" 'ldap_port' => '389',\n);" --target_file="$install_dir/wakka.config.php"
ynh_replace_string --match_string=");" --replace_string=" 'ldap_base' => 'ou=users,dc=yunohost,dc=org',\n);" --target_file="$install_dir/wakka.config.php"
ynh_replace_string --match_string=");" --replace_string=" 'enable_yunohost_sso' => true,\n);" --target_file="$install_dir/wakka.config.php"
# ToDo : verify if we need to chmod yunohost-user-info.sh to make it executable
# ToDo : update the CSS for mobile devices
# ToDo : update CLIC yeswiki model to display the yunohost apps
# ToDo : run the yunohost app importer during CLIC install
ynh_add_jinja_config --template="sudoers" --destination="/etc/sudoers.d/$app"
fi
if [ "${wikimodel}" = "CLIC" ]; then