Browse Source

fix: [cyclos] make "global administration" link work when using license data changing procedure

Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
cups_service_alpha
Valentin Lab 2 years ago
parent
commit
367dcb8b41
  1. 12
      cyclos/README.org
  2. 22
      cyclos/hooks/pre_deploy

12
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.

22
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
Loading…
Cancel
Save