| | |
| | | socialLogin, |
| | | } from '#/api'; |
| | | import { $t } from '#/locales'; |
| | | import { automaticApproval, loadAuditPolicy } from '#/store/audit-policy'; |
| | | |
| | | export const useAuthStore = defineStore('auth', () => { |
| | | const accessStore = useAccessStore(); |
| | |
| | | // eslint-disable-next-line no-useless-assignment |
| | | let authPermissionInfo: AuthPermissionInfo | null = null; |
| | | authPermissionInfo = await getAuthPermissionInfoApi(); |
| | | await loadAuditPolicy(); |
| | | // userStore |
| | | userStore.setUserInfo(authPermissionInfo.user); |
| | | userStore.setUserRoles(authPermissionInfo.roles); |
| | |
| | | |
| | | function $reset() { |
| | | loginLoading.value = false; |
| | | automaticApproval.value = false; |
| | | } |
| | | |
| | | return { |