diff --git a/conf/config.yaml b/conf/config.yaml index 6d65a8b..f2dd51e 100644 --- a/conf/config.yaml +++ b/conf/config.yaml @@ -659,7 +659,7 @@ oidc-scopes: # which only correlated users with their email address. Should be set to false for most usecases. # Options: [true, false] # Default: false -oidc-link-existing: false +oidc-link-existing: __OIDC_LINK_EXISTING__ # Array of string. If the returned ID token contains a 'groups' claim that matches one of the # groups in oidc-admin-groups, then this user will be granted admin rights on the GtS instance diff --git a/scripts/install b/scripts/install index 12b1c9c..6fc85f1 100755 --- a/scripts/install +++ b/scripts/install @@ -82,6 +82,7 @@ oidc_skip_verification="false" oidc_issuer="" oidc_client_id="" oidc_client_secret="" +oidc_link_existing="false" smtp_host="localhost" smtp_port="25" @@ -159,6 +160,14 @@ ynh_app_setting_set --app="$app" --key=statuses_poll_max_options --value="$statu ynh_app_setting_set --app="$app" --key=statuses_poll_option_max_chars --value="$statuses_poll_option_max_chars" ynh_app_setting_set --app="$app" --key=statuses_media_max_files --value="$statuses_media_max_files" +ynh_app_setting_set --app="$app" --key=oidc_enabled --value="$oidc_enabled" +ynh_app_setting_set --app="$app" --key=oidc_idp_name --value="$oidc_idp_name" +ynh_app_setting_set --app="$app" --key=oidc_skip_verification --value="$oidc_skip_verification" +ynh_app_setting_set --app="$app" --key=oidc_issuer --value="$oidc_issuer" +ynh_app_setting_set --app="$app" --key=oidc_client_id --value="$oidc_client_id" +ynh_app_setting_set --app="$app" --key=oidc_client_secret --value="$oidc_client_secret" +ynh_app_setting_set --app="$app" --key=oidc_client_secret --value="$oidc_link_existing" + ynh_app_setting_set --app="$app" --key=smtp_host --value="$smtp_host" ynh_app_setting_set --app="$app" --key=smtp_port --value="$smtp_port" ynh_app_setting_set --app="$app" --key=smtp_username --value="$smtp_username" diff --git a/scripts/restore b/scripts/restore index 1b8b050..a22d13f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -87,6 +87,7 @@ oidc_skip_verification=$(ynh_app_setting_get --app="$app" --key=oidc_skip_verifi oidc_issuer=$(ynh_app_setting_get --app="$app" --key=oidc_issuer) oidc_client_id=$(ynh_app_setting_get --app="$app" --key=oidc_client_id) oidc_client_secret=$(ynh_app_setting_get --app="$app" --key=oidc_client_secret) +oidc_link_existing=$(ynh_app_setting_get --app="$app" --key=oidc_link_existing) smtp_host=$(ynh_app_setting_get --app="$app" --key=smtp_host) smtp_port=$(ynh_app_setting_get --app="$app" --key=smtp_port) diff --git a/scripts/upgrade b/scripts/upgrade index ddbb328..bb1e85f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -75,6 +75,7 @@ oidc_skip_verification=$(ynh_app_setting_get --app="$app" --key=oidc_skip_verifi oidc_issuer=$(ynh_app_setting_get --app="$app" --key=oidc_issuer) oidc_client_id=$(ynh_app_setting_get --app="$app" --key=oidc_client_id) oidc_client_secret=$(ynh_app_setting_get --app="$app" --key=oidc_client_secret) +oidc_link_existing=$(ynh_app_setting_get --app="$app" --key=oidc_link_existing) smtp_host=$(ynh_app_setting_get --app="$app" --key=smtp_host) smtp_port=$(ynh_app_setting_get --app="$app" --key=smtp_port) @@ -353,6 +354,7 @@ then oidc_issuer="" oidc_client_id="" oidc_client_secret="" + oidc_link_existing="false" # registration of parameter ynh_app_setting_set --app="$app" --key=oidc_enabled --value="$oidc_enabled" ynh_app_setting_set --app="$app" --key=oidc_idp_name --value="$oidc_idp_name" @@ -360,6 +362,7 @@ then ynh_app_setting_set --app="$app" --key=oidc_issuer --value="$oidc_issuer" ynh_app_setting_set --app="$app" --key=oidc_client_id --value="$oidc_client_id" ynh_app_setting_set --app="$app" --key=oidc_client_secret --value="$oidc_client_secret" + ynh_app_setting_set --app="$app" --key=oidc_client_secret --value="$oidc_link_existing" fi #=================================================