akihitohyh and Claude Opus 5
b56c61eccd
feat(admin): let admins restrict which public groups a user may access
...
Public groups have always been bindable by every user: CanBindGroup returned
true for any non-exclusive group, and user_allowed_groups only ever carried the
exclusive groups an admin had granted. Admins had no way to hand a single user
a subset of the public groups short of converting a group to exclusive, which
changes it for everyone already using it.
A user now carries restrict_public_groups. While it is false, which is the
default and what every existing row migrates to, nothing changes: every public
group stays bindable. Once an admin turns it on for a user, that user's public
groups are narrowed to the ones listed in user_allowed_groups, the same table
that already gates exclusive groups.
The flag is an administrative control, so it rides on the admin user DTO only
and leaves the shape of the end-user endpoints alone.
The model plaza filter honours the flag as well, so a restricted user is not
shown groups they would be refused when binding a key. Anonymous visitors have
no user record and keep the previous view.
Enforcement rides on the existing CanBindGroup choke point, so it covers key
creation, key updates, and per-request authorization together. An API key bound
to a group that is later withdrawn stops working at request time rather than
lingering as a key that can be listed but not used.
The admin dialog gains a toggle over the public group list. Turning it off
re-checks every public group, so an admin cannot save a list that reads as
restrictive while the restriction itself is disabled.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com >
2026-08-28 02:40:17 +08:00
..
2026-07-01 12:21:45 +08:00
2025-12-29 10:03:27 +08:00
2026-03-07 15:06:13 +08:00
2026-02-02 22:13:50 +08:00
2026-03-03 15:01:10 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-07-04 05:30:50 +08:00
2026-07-04 05:30:50 +08:00
2026-07-06 12:22:04 +08:00
2026-08-18 03:50:01 +00:00
2026-04-23 17:31:15 +08:00
2026-08-18 03:50:01 +00:00
2026-08-18 03:50:01 +00:00
2026-07-23 09:20:18 +08:00
2025-12-29 10:03:27 +08:00
2026-02-10 11:42:39 +08:00
2026-08-13 07:49:08 +08:00
2026-07-23 09:20:18 +08:00
2026-02-28 15:01:20 +08:00
2026-04-20 17:39:57 +08:00
2026-07-23 09:20:18 +08:00
2026-08-28 02:40:17 +08:00
2026-04-11 13:16:35 +08:00
2026-04-21 12:41:27 +08:00
2026-04-14 16:26:46 +08:00
2026-04-20 17:39:57 +08:00
2026-07-23 09:20:18 +08:00
2026-01-10 13:14:35 +08:00
2026-01-10 13:14:35 +08:00
2026-06-08 00:01:30 +08:00
2026-05-19 15:53:28 +08:00
2026-08-28 02:40:17 +08:00
2026-08-28 02:40:17 +08:00
2026-02-12 11:41:20 +08:00
2025-12-31 15:31:26 +08:00
2026-07-15 11:17:45 +08:00
2026-03-27 14:33:05 +08:00
2026-02-02 22:13:50 +08:00
2026-08-07 09:40:11 -04:00
2026-08-28 02:40:17 +08:00
2025-12-29 10:03:27 +08:00
2026-01-01 18:58:34 +08:00
2026-01-01 18:58:34 +08:00
2026-05-26 10:49:20 +08:00
2025-12-31 14:11:57 +08:00
2026-07-01 12:21:45 +08:00
2025-12-29 10:03:27 +08:00
2026-07-01 12:21:45 +08:00
2026-07-01 12:21:45 +08:00
2026-07-01 12:21:45 +08:00
2025-12-29 10:03:27 +08:00
2025-12-29 10:03:27 +08:00
2026-01-10 13:14:35 +08:00
2025-12-29 10:03:27 +08:00
2025-12-29 10:03:27 +08:00
2026-03-07 15:06:13 +08:00
2026-02-02 22:13:50 +08:00
2026-02-02 22:13:50 +08:00
2026-03-07 15:06:13 +08:00
2026-03-07 15:06:13 +08:00
2026-02-02 22:13:50 +08:00
2026-02-02 22:13:50 +08:00
2026-02-02 22:13:50 +08:00
2026-02-02 22:13:50 +08:00
2026-02-02 22:13:50 +08:00
2026-03-03 15:01:10 +08:00
2026-01-04 19:28:20 +08:00
2026-01-10 13:14:35 +08:00
2026-03-03 15:01:10 +08:00
2026-03-03 15:01:10 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-07-04 05:30:50 +08:00
2026-07-04 05:30:50 +08:00
2026-07-04 05:30:50 +08:00
2026-07-04 05:30:50 +08:00
2026-07-04 05:30:50 +08:00
2026-07-04 05:30:50 +08:00
2026-07-04 05:30:50 +08:00
2026-07-04 05:30:50 +08:00
2026-07-04 05:30:50 +08:00
2026-07-04 05:30:50 +08:00
2026-07-06 12:22:04 +08:00
2026-07-04 05:30:50 +08:00
2026-07-04 05:30:50 +08:00
2026-07-06 12:22:04 +08:00
2026-07-06 12:22:04 +08:00
2026-08-18 03:50:01 +00:00
2026-04-20 20:21:02 +08:00
2026-04-21 14:14:49 +08:00
2026-08-18 03:50:01 +00:00
2026-08-18 03:50:01 +00:00
2026-04-23 17:31:15 +08:00
2026-04-21 10:10:56 +08:00
2026-04-23 17:31:15 +08:00
2026-04-23 17:31:15 +08:00
2026-04-23 17:31:15 +08:00
2026-08-18 03:50:01 +00:00
2026-04-20 20:21:02 +08:00
2026-04-23 17:31:15 +08:00
2026-08-18 03:50:01 +00:00
2026-08-18 03:50:01 +00:00
2026-05-19 22:05:43 +08:00
2026-04-21 14:14:49 +08:00
2026-04-21 14:14:49 +08:00
2026-05-19 22:05:43 +08:00
2026-05-19 22:05:43 +08:00
2026-08-01 22:39:31 +08:00
2026-07-23 09:20:18 +08:00
2026-07-23 09:20:18 +08:00
2026-07-23 09:20:18 +08:00
2026-07-23 09:20:18 +08:00
2026-07-23 09:20:18 +08:00
2026-01-03 06:37:08 -08:00
2026-07-23 09:20:18 +08:00
2026-02-10 11:42:39 +08:00
2026-02-05 21:52:54 +08:00
2026-02-05 21:52:54 +08:00
2026-02-10 11:42:39 +08:00
2026-02-10 11:42:39 +08:00
2026-01-10 13:14:35 +08:00
2026-08-24 12:02:53 +08:00
2025-12-29 10:03:27 +08:00
2026-01-10 13:14:35 +08:00
2026-08-24 12:02:53 +08:00
2026-08-24 12:02:53 +08:00
2026-02-28 15:01:20 +08:00
2026-02-28 15:01:20 +08:00
2026-02-28 15:01:20 +08:00
2026-02-28 15:01:20 +08:00
2026-02-28 15:01:20 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-08-28 02:40:17 +08:00
2026-04-11 13:16:35 +08:00
2026-04-11 13:16:35 +08:00
2026-04-11 13:16:35 +08:00
2026-04-11 13:16:35 +08:00
2026-04-11 13:16:35 +08:00
2026-04-21 12:41:27 +08:00
2026-04-11 13:16:35 +08:00
2026-04-11 13:16:35 +08:00
2026-04-21 12:41:27 +08:00
2026-04-21 12:41:27 +08:00
2026-04-14 16:26:46 +08:00
2026-04-11 13:16:35 +08:00
2026-04-11 13:16:35 +08:00
2026-04-14 16:26:46 +08:00
2026-04-14 16:26:46 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-04-20 17:39:57 +08:00
2026-01-10 13:14:35 +08:00
2026-01-10 13:14:35 +08:00
2026-01-10 13:14:35 +08:00
2026-01-10 13:14:35 +08:00
2026-01-10 13:14:35 +08:00
2026-01-10 13:14:35 +08:00
2026-01-10 13:14:35 +08:00
2026-01-10 13:14:35 +08:00
2026-01-10 13:14:35 +08:00
2026-01-10 13:14:35 +08:00
2026-06-08 00:01:30 +08:00
2025-12-29 10:03:27 +08:00
2026-06-08 00:01:30 +08:00
2026-06-08 00:01:30 +08:00
2026-06-08 00:01:30 +08:00
2026-05-19 15:53:28 +08:00
2025-12-29 10:03:27 +08:00
2026-01-10 13:14:35 +08:00
2026-05-19 15:53:28 +08:00
2026-05-19 15:53:28 +08:00
2025-12-29 10:03:27 +08:00
2026-02-12 11:41:20 +08:00
2026-02-12 11:41:20 +08:00
2026-02-12 11:41:20 +08:00
2026-02-12 11:41:20 +08:00
2026-02-12 11:41:20 +08:00
2025-12-31 15:31:26 +08:00
2025-12-29 10:03:27 +08:00
2026-01-10 13:14:35 +08:00
2025-12-31 15:31:26 +08:00
2025-12-29 10:03:27 +08:00
2026-07-15 11:17:45 +08:00
2026-04-11 13:16:35 +08:00
2026-04-11 13:16:35 +08:00
2026-07-15 11:17:45 +08:00
2026-07-15 11:17:45 +08:00
2026-03-27 14:33:05 +08:00
2026-03-27 14:33:05 +08:00
2026-03-27 14:33:05 +08:00
2026-03-27 14:33:05 +08:00
2026-03-27 14:33:05 +08:00
2026-06-30 13:22:27 +08:00
2026-07-23 09:20:18 +08:00
2026-08-24 12:02:53 +08:00
2026-02-02 22:13:50 +08:00
2026-02-02 22:13:50 +08:00
2026-08-24 12:02:53 +08:00
2026-08-24 12:02:53 +08:00
2026-08-07 09:40:11 -04:00
2025-12-31 14:11:57 +08:00
2026-01-10 13:14:35 +08:00
2026-08-07 09:40:11 -04:00
2026-08-07 09:40:11 -04:00
2026-08-28 02:40:17 +08:00
2025-12-29 10:03:27 +08:00
2026-05-26 10:49:20 +08:00
2026-08-28 02:40:17 +08:00
2026-08-28 02:40:17 +08:00
2025-12-29 10:03:27 +08:00
2025-12-29 10:03:27 +08:00
2026-01-10 13:14:35 +08:00
2025-12-29 10:03:27 +08:00
2025-12-29 10:03:27 +08:00
2026-01-01 18:58:34 +08:00
2026-01-01 18:58:34 +08:00
2026-01-10 13:14:35 +08:00
2026-01-01 18:58:34 +08:00
2026-01-01 18:58:34 +08:00
2026-01-01 18:58:34 +08:00
2026-01-01 18:58:34 +08:00
2026-01-10 13:14:35 +08:00
2026-01-01 18:58:34 +08:00
2026-01-01 18:58:34 +08:00
2026-05-26 10:49:20 +08:00
2026-05-26 10:49:20 +08:00
2026-05-26 10:49:20 +08:00
2026-05-26 10:49:20 +08:00
2026-05-26 10:49:20 +08:00
2025-12-31 14:11:57 +08:00
2025-12-29 10:03:27 +08:00
2026-01-10 13:14:35 +08:00
2025-12-31 14:11:57 +08:00
2025-12-31 14:11:57 +08:00