diff --git a/conf/sudoers b/conf/sudoers new file mode 100644 index 0000000..2a20943 --- /dev/null +++ b/conf/sudoers @@ -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 diff --git a/manifest.toml b/manifest.toml index 23083ea..c065a99 100644 --- a/manifest.toml +++ b/manifest.toml @@ -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" diff --git a/scripts/install b/scripts/install index acffe15..e48e7f2 100755 --- a/scripts/install +++ b/scripts/install @@ -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