frontend phase 15
This commit is contained in:
@@ -17,6 +17,11 @@ export function useSessionRoleSync(): void {
|
||||
|
||||
useEffect(() => {
|
||||
if (!me) return;
|
||||
dispatch({ type: 'LOG_IN', user: { id: me.id, phone: me.phone, roles: toAppRoles(me.roles) } });
|
||||
dispatch({
|
||||
type: 'LOG_IN',
|
||||
// `roleCodes` preserves the server's fine-grained codes for the f15 admin-capability gate;
|
||||
// the collapsed `roles` still drive shell chrome.
|
||||
user: { id: me.id, phone: me.phone, roles: toAppRoles(me.roles), roleCodes: me.roles },
|
||||
});
|
||||
}, [me, dispatch]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user