feat(admin-portal): forgot password page; own account cannot be deactivated
/forgot-password always shows the same message; the route never forwards upstream errors or a token. /api/admin/me now returns id and username so the user form can lock the Active switch on your own account. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfj5akPxyikzGc2iAHM
This commit is contained in:
1 parent
1071ddaa2a
commit
da813874ec
22 files changed
+379
-11
No files matched your search
+3
@@ -188,9 +188,12 @@ class AdminAuthControllerTest {
|
||||
void me_returnsNameRolesAndAclMenu() throws Exception {
|
||||
User u = user(true, GeneralEnum.LoginStatus.Y);
|
||||
u.setAclMenu(new com.solvway.core.model.Module());
|
||||
u.setUsername("admin.user");
|
||||
when(auth.loadUserByToken("tok")).thenReturn(u);
|
||||
|
||||
mvc.perform(get("/api/admin/me")).andExpect(status().isOk())
|
||||
.andExpect(jsonPath("$.id").value(9))
|
||||
.andExpect(jsonPath("$.username").value("admin.user"))
|
||||
.andExpect(jsonPath("$.name").value("Admin User"))
|
||||
.andExpect(jsonPath("$.roles[0].name").value("ROLE_ADMIN"))
|
||||
.andExpect(jsonPath("$.aclMenu").exists())
|
||||
|
||||
Reference in new issue
Block a user