Give trusted apps the user's role

Anikeen ID now sends trusted apps the user's role (admin or user) in
GET v1/user, a user read by ID and user.updated, so an app like the
Console can take its admins from Anikeen ID. Enums\Role, the Socialite
user's role and Resources\User::role()/isAdmin() expose it.
This commit is contained in:
envoyr committed 2026-11-07 15:24:48 +00:00
1 parent 31de31aa47
commit 642e518259
8 files changed
+154 -1

No files matched your search

+11
View File
@@ -1,5 +1,16 @@
# Changelog
## Unreleased
The user's role for trusted apps; it needs an Anikeen ID release that sends it.
### Added
- `Enums\Role` (`ADMIN`, `USER`): the user's Anikeen ID role, seen by trusted apps only.
- The Socialite user carries it as `$user->role` (`null` for other apps).
- `Resources\User::role()` and `isAdmin()`, for a user read by ID (`findUserById()`) and the
`data.object` of `user.updated`, which for trusted apps carries `role` (and `role` in `changed`).
## 3.4.0 (2026-11-07)
Preferences, charges, the billing limit, user profiles and the user and preference webhooks; they