Commit e3953e8b45b1a71ead8f7ed08a556ae641417026
1 parent
1ad904a7
chore(usr): warn about permGroupIds data gap in edit mode
Showing
1 changed file
with
10 additions
and
1 deletions
frontend/src/pages/usr/UserDetailPage.tsx
| ... | ... | @@ -176,7 +176,16 @@ export default function UserDetailPage() { |
| 176 | 176 | ))} |
| 177 | 177 | </div> |
| 178 | 178 | |
| 179 | - {/* Permission list */} | |
| 179 | + {/* Permission list | |
| 180 | + KNOWN LIMITATION (edit mode): UserListItemVO does not include permGroupIds (backend list API | |
| 181 | + does not return them). In edit mode, selectedPermIds starts empty — saving will overwrite | |
| 182 | + existing permissions with whatever the user selects here. A future backend GET /usr/users/:id | |
| 183 | + endpoint should return permGroupIds so they can be pre-populated. */} | |
| 184 | + {!isNew && activePermTab === 0 && ( | |
| 185 | + <div style={{ background: '#fffbe6', borderBottom: '1px solid #ffe58f', padding: '8px 14px', fontSize: 12, color: '#ad6800' }}> | |
| 186 | + ⚠ 编辑模式下权限组未预加载(后端列表接口不返回 permGroupIds)。保存将以当前勾选为准,请重新勾选所需权限组。 | |
| 187 | + </div> | |
| 188 | + )} | |
| 180 | 189 | <div style={{ flex: 1, background: '#fff', overflow: 'auto' }}> |
| 181 | 190 | <div style={{ display: 'flex', alignItems: 'center', gap: 14, padding: '10px 14px', borderBottom: '1px solid var(--color-table-border)', background: 'var(--color-table-header-bg)', fontWeight: 500, color: '#222', fontSize: 13 }}> |
| 182 | 191 | <span style={{ width: 14, height: 14, border: '1px solid #b8bcc3', display: 'inline-block', flexShrink: 0 }} /> | ... | ... |