Skip to content

to master#216

Merged
JoshuaVSherman merged 2 commits into
masterfrom
dev
May 23, 2026
Merged

to master#216
JoshuaVSherman merged 2 commits into
masterfrom
dev

Conversation

@JoshuaVSherman
Copy link
Copy Markdown
Contributor

No description provided.

JoshuaVSherman and others added 2 commits May 23, 2026 05:28
The newTour handler now checks `user.privileges.includes('tour:create')`
when the user has a non-empty privileges array, and falls back to the
existing `userRoles`-based check when privileges is empty.

- Existing users (no privileges set) keep authorizing via userType — no
  behavior change for any current human user.
- New admin-managed users (created via the forthcoming JaMmusic admin UI)
  authorize via per-user privileges.
- Extracted the auth check into `utils.assertCanCreateTour` to keep
  newTour under the cognitive-complexity ceiling.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
feat(newTour): check user privileges before role-based fallback
@JoshuaVSherman JoshuaVSherman merged commit c404627 into master May 23, 2026
2 checks 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.

1 participant