From 367dcb8b41e187be5577e4b8e71306fa7c33072f Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Wed, 14 Sep 2022 12:07:45 +0200 Subject: [PATCH] fix: [cyclos] make "global administration" link work when using license data changing procedure Signed-off-by: Valentin Lab --- cyclos/README.org | 12 ++++++++++-- cyclos/hooks/pre_deploy | 22 ++++++++-------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/cyclos/README.org b/cyclos/README.org index 9893c38..38eac58 100644 --- a/cyclos/README.org +++ b/cyclos/README.org @@ -180,5 +180,13 @@ At the end of the wizard, you'll have a broken interface. You can point to the root url and then disconnect, and reconnect with the standard admin. -Go to general settings, then users management, and select =adminTemp= -user, and ask to remove it. Purge it completely. +Because the procedure re-setted the =root_url= settings, you need +to launch a re-deployment: + +#+begin_src sh +compose up +#+end_src + +Then, in the browser, once logged in the standard admin, you can go to +Global Administration, settings, then users management, and select +=adminTemp= user, and ask to remove it. Purge it completely. diff --git a/cyclos/hooks/pre_deploy b/cyclos/hooks/pre_deploy index 3b51a64..368192f 100755 --- a/cyclos/hooks/pre_deploy +++ b/cyclos/hooks/pre_deploy @@ -45,19 +45,13 @@ fi url=$(named-relation-get "web-proxy" url) || exit 1 -CONTROL_URL_FILE="$SERVICE_DATASTORE/.control-url" -## Was it already properly propagated to database ? -control_url=$(H "${url}") -if ! [ -e "$CONTROL_URL_FILE" ] || [ "$control_url" != "$(cat "$CONTROL_URL_FILE")" ]; then - ## In ``configurations`` table, columns login_url, logout_url, root_url - if ! sql < <(e " - UPDATE configurations - SET - root_url = '$url' - "); then - debug "Failed to set password for admin users." - exit 1 - fi - e "$control_password" > "$CONTROL_URL_FILE" +## In ``configurations`` table, columns login_url, logout_url, root_url +if ! sql < <(e " +UPDATE configurations +SET + root_url = '$url' +"); then + debug "Failed to set password for admin users." + exit 1 fi