Skip to content

to main#790

Merged
JoshuaVSherman merged 2 commits into
mainfrom
dev
Jun 4, 2026
Merged

to main#790
JoshuaVSherman merged 2 commits into
mainfrom
dev

Conversation

@JoshuaVSherman

Copy link
Copy Markdown
Contributor

No description provided.

JoshuaVSherman and others added 2 commits June 4, 2026 17:28
Supports JaMmusic's new "edit Type" UI (Maria review #11). The admin
user PUT/POST now accept userStatus and validate it:

- userStatus must be one of human / ai-agent (rejects legacy values
  like "enabled" with 400)
- ai-agent is only allowed when the resulting role (userType) is
  web-jam-llm, enforced server-side so the UI rule can't be bypassed

findByIdAndUpdate now fetches the existing record once when either
userType or userStatus changes, and uses the resulting role for the
guard.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(admin-user): accept + guard userStatus on create/update (Maria #11)
@JoshuaVSherman JoshuaVSherman merged commit 2782232 into main Jun 4, 2026
0 of 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