Skip to content

fix: include j26-booking roles - #55

Merged
hakan-persson merged 3 commits into
mainfrom
booking-fixes
Jul 5, 2026
Merged

fix: include j26-booking roles#55
hakan-persson merged 3 commits into
mainfrom
booking-fixes

Conversation

@scriptcoded

Copy link
Copy Markdown
Member
  • Adds missing roles from j26-booking
  • Allows all users to create bookings
  • Updates j26-map to support new localization format from j26-booking

@scriptcoded
scriptcoded requested a review from a team as a code owner July 5, 2026 20:08
@hakan-persson
hakan-persson requested a review from Copilot July 5, 2026 20:25
hakan-persson added a commit to Scouterna/j26-keycloak that referenced this pull request Jul 5, 2026
Replace the stale single `events:read` role on the j26-booking client
with the real role set the app models (activities:manage, bookings:read,
bookings:self:create, bookings:others:create, admin), and grant
bookings:self:create to all synced users via the j26-scoutid-sync parent
group so everyone can create their own bookings.

Ports the Keycloak-config portion of Scouterna/j26-infra#55 back to the
source of truth in this repo.

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates production Kubernetes manifests to (1) expand Keycloak client roles for j26-booking and grant booking self-create to the synced user group, and (2) bump the j26-map image version to a release that supports the updated localization format used by j26-booking.

Changes:

  • Add missing j26-booking client roles and assign bookings:self:create to the j26-scoutid-sync group.
  • Bump j26-map prod image tag from 0.2.0 to 0.2.1.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
k8s/app-manifest-prod/j26-map/kustomization.yaml Pins prod j26-map image tag to 0.2.1 to pick up localization changes.
k8s/app-manifest-prod/j26-keycloak-scoutid/45-keycloak-config-configmap.yaml Adds j26-booking client roles and grants bookings:self:create via the synced parent group.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hakan-persson

hakan-persson commented Jul 5, 2026

Copy link
Copy Markdown
Member

Thanks for adding the booking roles, Malcolm! 🙏 The role model itself looks right. One heads-up on the workflow here — this is an easy one to miss, so definitely not on you:

45-keycloak-config-configmap.yaml is a generated file. It's built from the source in the j26-keycloak repo (the keycloak-config/*.yaml files → kubectl create configmap … --dry-run → this file). So Keycloak changes should go in that repo first and then get regenerated into here, otherwise the source-of-truth and the deployed file drift apart. I've already ported your role changes into the source repo, so we're covered there.

There's a concrete reason this matters right now — there's a second open PR against the same generated file, and the two hand-edits each carry a different half of the truth:

groups-claim mapper (#52) booking roles (#55)
main
#52
#55 (this PR)
j26-keycloak (source)

Because the two edits touch different regions of the file, git will happily auto-merge them without a conflict — but whichever merges second silently ends up missing the other's change, and the config-cli sync would then strip it from prod Keycloak. #52 adds the groups claim mapper on j26-auth (already live in prod); this PR would regress it.

Proposed fix so nothing gets lost: instead of merging the two hand-edits, let's replace this file with a single clean regeneration from the source repo (which already has both the mapper and the booking roles). It'll show as a small diff that adds the mapper back on top of your role changes, and then #52 can close as absorbed. Happy to push that onto this branch, or you can regenerate on your end — whichever you prefer.

(The j26-map 0.2.0 → 0.2.1 bump is unrelated and totally fine.)

Regenerate 45-keycloak-config-configmap.yaml from the j26-keycloak-scoutid
source repo so it carries BOTH the j26-booking roles (this PR) AND the
j26-auth groups-claim mapper (PR #52) — the source has both. Without this,
merging this PR would drop the groups mapper that is live in prod.

Diff vs the source-repo file is only the namespace (j26-prod). Supersedes
PR #52, which can now close as absorbed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hakan-persson
hakan-persson merged commit 14e8ad0 into main Jul 5, 2026
1 check passed
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.

3 participants