naiba
f7f8264ec0
fix(auth): always serialize User.Role so admin (role 0) is not omitted
...
The Role field used json:"role,omitempty". Admin is RoleAdmin = 0, so an
admin profile serialized without a `role` key. The admin-frontend gates the
admin menu (user management, settings) on `role === 0`, and its normalizeRole
helper defaults a missing role to non-admin, so admins lost the admin menu.
Drop omitempty so role 0 is always sent. Add a regression test.
2026-05-31 12:05:11 +00:00
..
2024-12-19 23:21:15 +08:00
2026-05-30 15:56:44 +00:00
2025-03-19 22:21:21 +08:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-31 08:16:55 +00:00
2024-12-28 23:50:59 +08:00
2026-05-17 10:24:19 +08:00
2026-05-30 15:56:44 +00:00
2026-05-26 03:50:26 +00:00
2026-05-31 02:04:35 +00:00
2026-05-30 15:56:44 +00:00
2024-11-19 23:34:56 +08:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2024-11-16 20:57:03 +08:00
2025-04-26 18:28:21 +08:00
2024-10-25 09:09:08 +08:00
2024-12-04 20:00:18 +08:00
2026-05-26 03:51:05 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2025-01-21 22:23:15 +08:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-01-10 17:29:10 +08:00
2024-11-16 20:57:03 +08:00
2024-10-23 21:55:12 +08:00
2024-10-20 00:32:55 +08:00
2026-05-25 10:17:34 +00:00
2026-05-18 15:14:27 +00:00
2025-02-24 20:53:11 +08:00
2025-03-04 20:28:22 +08:00
2025-03-19 22:21:21 +08:00
2025-02-04 11:25:49 +08:00
2024-11-16 20:57:03 +08:00
2024-10-21 23:00:51 +08:00
2024-10-20 23:23:04 +08:00
2026-05-25 10:17:34 +00:00
2026-05-25 10:17:34 +00:00
2026-05-25 10:17:34 +00:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-02-15 13:13:33 +08:00
2026-02-15 13:13:33 +08:00
2026-02-15 13:13:33 +08:00
2026-05-30 15:56:44 +00:00
2026-05-30 15:56:44 +00:00
2026-05-31 02:04:35 +00:00
2024-10-22 22:01:01 +08:00
2024-11-16 20:57:03 +08:00
2025-08-28 22:37:44 +08:00
2026-05-31 12:05:11 +00:00
2026-05-31 12:05:11 +00:00
2025-02-28 22:02:54 +08:00