feat: login

This commit is contained in:
2025-09-10 15:20:45 +08:00
parent f33f597a9a
commit 55cd1f349d
21 changed files with 285 additions and 1157 deletions

View File

@@ -4,10 +4,10 @@ import { UserVO } from "./services/login/types";
* @see https://umijs.org/docs/max/access#access
* */
export default function access(
initialState: { currentUser?: UserVO } | undefined
initialState: { currentUser?: { user: UserVO } } | undefined
) {
const { currentUser } = initialState ?? {};
return {
canAdmin: currentUser && currentUser.username === "admin",
canAdmin: currentUser && currentUser.user.username === "admin",
};
}