The chat service was added on the host by go-live.sh chat and never pushed, so a deploy took it out of compose.yml. This is the service as the host ran it, with chat.env ignored and the sign-in pages named after SITE_TITLE. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015TMMKWhj4225cSbXKhSz6e
This commit is contained in:
4 files changed
+41
-3
No files matched your search
+6
-3
@@ -15,6 +15,9 @@ cd "$(dirname "$0")"
|
||||
K="kanidm -D idm_admin -H https://$ID_HOST"
|
||||
C=$OAUTH2_CLIENT_ID
|
||||
SA=portal-onboarding
|
||||
# What a person reads on the sign-in pages. Not SITE_NAME, which from portal
|
||||
# 0.9 is the site's namespace, `tomtervel`.
|
||||
SITE_TITLE=${SITE_TITLE:-Tomter Vel}
|
||||
|
||||
# Already signed in? Then do not ask again: this script is meant to be
|
||||
# rerunnable, and the session outlives a single run.
|
||||
@@ -76,7 +79,7 @@ fi
|
||||
# The OAuth2 client. Everyone in this Kanidm is the vel's, so anyone
|
||||
# may sign in; what they see is decided by their desk groups, which
|
||||
# arrive in the `groups` claim under their own names.
|
||||
has_client $C || $K system oauth2 create $C "$SITE_NAME" "https://$PORTAL_HOST"
|
||||
has_client $C || $K system oauth2 create $C "$SITE_TITLE" "https://$PORTAL_HOST"
|
||||
$K system oauth2 add-redirect-url $C "https://$PORTAL_HOST/auth/callback" 2>/dev/null || true
|
||||
$K system oauth2 update-scope-map $C idm_all_persons openid profile email
|
||||
for g in $groups; do
|
||||
@@ -100,7 +103,7 @@ fi
|
||||
# may change - idm_admin gets a bare "Item not found" - so that half
|
||||
# runs when an admin session exists, and otherwise says what to run.
|
||||
A="kanidm -D admin -H https://$ID_HOST"
|
||||
$K system oauth2 set-displayname $C "$SITE_NAME" >/dev/null || true
|
||||
$K system oauth2 set-displayname $C "$SITE_TITLE" >/dev/null || true
|
||||
logo=$(mktemp --suffix=.svg)
|
||||
if curl -sfL "$CONTENT_REPO/raw/branch/$CONTENT_BRANCH/images/logo.svg" -o "$logo" && [ -s "$logo" ]; then
|
||||
$K system oauth2 set-image $C "$logo" svg >/dev/null || echo "note: could not set the client logo"
|
||||
@@ -109,7 +112,7 @@ else
|
||||
: > "$logo"
|
||||
fi
|
||||
if $A self whoami >/dev/null 2>&1; then
|
||||
$A system domain set-displayname "$SITE_NAME" >/dev/null || echo "note: could not set the login page's name"
|
||||
$A system domain set-displayname "$SITE_TITLE" >/dev/null || echo "note: could not set the login page's name"
|
||||
[ -s "$logo" ] && { $A system domain set-image "$logo" svg >/dev/null || echo "note: could not set the login page's logo"; }
|
||||
else
|
||||
echo "note: the login page's own name and logo need the admin account (bootstrap.sh printed its password):"
|
||||
|
||||
Reference in new issue
Block a user