Skip to content

OpenConceptLab/ocl_issues#2844 | Sign-up links the Terms of Use and Privacy Policy - #2

Merged
paynejd merged 4 commits into
mainfrom
OpenConceptLab/ocl_issues#2844-signup-legal-links
Oct 14, 2026
Merged

paynejd merged 4 commits into
mainfrom
OpenConceptLab/ocl_issues#2844-signup-legal-links

Conversation

@paynejd

@paynejd paynejd commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Part of OpenConceptLab/ocl_issues#2844. Creating an OCL account means accepting OCL's Terms of Use, but the sign-up page didn't link it or the Privacy Policy. Now a line under the form does. TBv2's footer is a separate PR: OpenConceptLab/oclweb2#55.

What changed

The line (themes/v3/login/register.ftl, the login theme the live sign-up page uses). It reads "By creating an account you agree to the Terms of Use and Privacy Policy." It links https://openconceptlab.org/terms-of-use and https://openconceptlab.org/privacy-policy.

  • Both links open in a new tab (target="_blank", rel="noopener noreferrer"), so the form keeps what was typed in it.
  • The template builds the two links and passes them to the registerTermsNotice message as {0} and {1}. The URLs stay out of the translations. And kcSanitize, which the template uses for messages that contain HTML, would strip target and add rel="nofollow".
  • It's 12 px, the size of the form's field labels, in a muted grey (#5e5c71, the colour of the login page's "Do not have an OCL account?", lighter than the labels' #363636), with the theme's usual link colour. The links inherit the 12 px, overriding the theme's 14 px rule for every link. It's styled by ID, because PatternFly's .login-pf-page .card-pf p outranks a class selector.

Messages. registerTermsNotice, termsOfUse and privacyPolicy are in en, es and zh, and in a new messages_pt_BR.properties, because the live page offers Português (Brasil). The labels are the same as TBv3's and the Mapper's footers.

Line
en By creating an account you agree to the Terms of Use and Privacy Policy.
es Al crear una cuenta, aceptas los Términos de uso y la Política de privacidad.
pt-BR Ao criar uma conta, você concorda com os Termos de uso e a Política de privacidade.
zh 创建账户即表示您同意使用条款和隐私政策。

The es line uses "aceptas", the informal form, as the bundle's existing "¿Has olvidado tu contraseña". Each language's translation lead may want to confirm these.

Encoding (second commit, separable). Keycloak 19 reads the theme's bundles as ISO-8859-1, so UTF-8 text comes out garbled.

  • The new strings use \uXXXX escapes, and each bundle now says so at the top.
  • The existing es and zh strings had the same problem. The live Spanish sign-up form labels two fields "Compañía" and "Ubicación". The zh strings are broken the same way, though the live page doesn't offer zh.
  • 1cd916b escapes them. No string changes. It's a separate commit, so it can be dropped if you'd rather keep this PR to the links.

How I tested it

I used stock quay.io/keycloak/keycloak:19.0.1 (the version the Dockerfile pins) in start-dev, with themes/v3 mounted and theme caching off. A throwaway local realm used v3 as its login theme, with registration and en, es, pt-BR and zh enabled. Headless Chromium opened the register page and switched language through the page's own menu. At 1280 and 375 px, in each language, it checked that:

  • the line shows below the form, translated, with no garbled characters;
  • both links have the right URL, target="_blank" and rel="noopener noreferrer";
  • the text colour is #5e5c71.

After the encoding commit, it also checked that the es labels read "Compañía" and "Ubicación", and that the zh title and labels render.

How to review it locally

gh pr checkout 'OpenConceptLab/ocl_issues#2844-signup-legal-links' --repo OpenConceptLab/oclsso
docker run -d --name kc-review -p 8180:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin \
  -v "$PWD/themes/v3":/opt/keycloak/themes/v3:ro quay.io/keycloak/keycloak:19.0.1 start-dev \
  --spi-theme-cache-themes=false --spi-theme-cache-templates=false
# once http://localhost:8180 answers:
docker exec kc-review /opt/keycloak/bin/kcadm.sh config credentials --server http://localhost:8080 --realm master --user admin --password admin
docker exec kc-review /opt/keycloak/bin/kcadm.sh create realms -s realm=review -s enabled=true -s registrationAllowed=true \
  -s loginTheme=v3 -s internationalizationEnabled=true -s 'supportedLocales=["en","es","pt-BR","zh"]'

Open http://localhost:8180/realms/review/account/, choose Register, and switch languages from the menu at the top right. Remove the container with docker rm -f kc-review when you're done.

Going live

oclsso has no CI, so merging changes nothing on the live page. The change reaches users once the image is rebuilt and the SSO service is redeployed. No realm setting changes are needed: the live realm already uses the v3 theme and offers these languages.

Noticed, not fixed

  • ocl-realm.json still names ocl as the login theme and has internationalization off. It doesn't match the live realm, but --import-realm skips a realm that already exists, so it only matters for a fresh install.
  • The custom field labels (Company, Location) have no pt-BR strings in this theme, so the pt-BR page shows them in English.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UML1sP39mf4a2ynq22C9RD

paynejd and others added 2 commits October 13, 2026 16:05
…rivacy Policy

The v3 login theme's register page now ends with "By creating an account
you agree to the Terms of Use and Privacy Policy", linking
https://openconceptlab.org/terms-of-use and
https://openconceptlab.org/privacy-policy in a new tab, so the form keeps
what was typed in it.

- The template builds both links and passes them to registerTermsNotice
  as {0} and {1}, so the URLs stay out of the translations and kcSanitize
  can't strip target and rel.
- registerTermsNotice, termsOfUse and privacyPolicy are in en, es and zh,
  and a new messages_pt_BR.properties, since the live page offers pt-BR.
  The labels match TBv3's and the Mapper's.
- Keycloak 19 reads the bundles as ISO-8859-1, so the new strings use
  \uXXXX escapes, and the files say so.
- Grey 14px text (#5e5c71), styled by ID because PatternFly's
  .login-pf-page .card-pf p outranks a class selector.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UML1sP39mf4a2ynq22C9RD
…o Keycloak 19 shows them as written

Keycloak 19 reads the theme's message bundles as ISO-8859-1, so the
UTF-8 strings in messages_es.properties and messages_zh.properties came
out garbled: the live Spanish sign-up form labels its fields
"Compañía" and "Ubicación". Each non-ASCII character is now a
\uXXXX escape, as doForgotPassword already was, and each file says why
at the top. No string changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UML1sP39mf4a2ynq22C9RD
@paynejd

paynejd commented Oct 13, 2026

Copy link
Copy Markdown
Member Author

Codex review, pass 1 (codex-cli 0.162.1, commit 1cd916b)

Verdict: clean. No findings.

findings.json
{
  "reviewer": "codex-cli 0.162.1",
  "perspective": "defects",
  "mode": "full",
  "commit": "1cd916b",
  "verdict": "clean",
  "prior": [],
  "findings": []
}

…n-up terms line

Nothing centres the card's content, so the line is left-aligned without it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UML1sP39mf4a2ynq22C9RD
@paynejd

paynejd commented Oct 13, 2026

Copy link
Copy Markdown
Member Author

Simplification review (fresh Claude subagent, commit 1cd916b)

Verdict: one proposed cut.

  • S1 (delete, styles.css): text-align: left on #kc-register-terms is a no-op. Applied in 5cf2516. I checked on Keycloak 19.0.1 that the line is still left-aligned and #5e5c71.
simplify.json
{
  "reviewer": "claude subagent",
  "perspective": "simplify",
  "mode": "full",
  "commit": "1cd916b",
  "verdict": "findings",
  "prior": [],
  "findings": [
    {
      "id": "S1",
      "severity": null,
      "tag": "delete",
      "file": "themes/v3/login/resources/css/styles.css",
      "line": 162,
      "claim": "`text-align: left;` in #kc-register-terms is a no-op copied from span.no-account-text. The <p> sits in .card-pf > #kc-content > #kc-content-wrapper, and nothing centres those. I checked styles.css and the four stylesheets the live sign-up page loads: base.css, app.css, patternfly.min.css and patternfly-additions.min.css. Only .login-pf-page-header, .login-pf-header h1, .login-pf-signup and the social links are centred, and the card is a sibling of the header, not inside it. So the paragraph is left-aligned without the rule. The rule would also be wrong for a right-to-left locale.",
      "scenario": null,
      "action": "nothing replaces it",
      "lines_delta": -1,
      "confidence": "high"
    }
  ]
}

Codex review, check of cuts (codex-cli 0.162.1, commit 5cf2516)

Verdict: clean. No findings.

findings.json
{
  "reviewer": "codex-cli 0.162.1",
  "perspective": "defects",
  "mode": "cuts",
  "commit": "5cf2516",
  "verdict": "clean",
  "prior": [],
  "findings": []
}

…ls' size, muted

The line under the sign-up form was 14 px, larger than the form's 12 px
field labels. It's now 12 px, in the same muted grey (#5e5c71, lighter
than the labels' #363636). Its links inherit the size, overriding the
theme's 14 px rule for every link.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paynejd

paynejd commented Oct 14, 2026

Copy link
Copy Markdown
Member Author

Codex review, check of 14e0ce7 (codex-cli 0.162.1, commit 14e0ce7)

Verdict: clean. No findings.

14e0ce7 comes from Jon's browser review: the terms line was 14 px, larger than the form's 12 px field labels. It's now 12 px in the same muted grey (#5e5c71, lighter than the labels' #363636), and its links inherit the 12 px instead of taking the theme's 14 px rule for every link. Measured on Keycloak 19.0.1: the line and both links are 12 px, the same as the labels.

findings.json
{
  "reviewer": "codex-cli 0.162.1",
  "perspective": "defects",
  "mode": "cuts",
  "commit": "14e0ce7",
  "verdict": "clean",
  "prior": [],
  "findings": []
}

@paynejd
paynejd merged commit 02f82a8 into main Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant