Compare commits
1 Commits
main
...
dev/local-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0dc45504f2 |
@@ -82,7 +82,19 @@ export default function AuthProvider({ children }: { children: ReactNode }) {
|
||||
const jumpToken = params.get('jumpToken');
|
||||
|
||||
if (!jumpToken) {
|
||||
setState({ isLoading: false, isAuthenticated: false, user: null, error: '请从业务系统跳转访问' });
|
||||
// 临时:本地开发免登录,含智能调度权限
|
||||
setState({
|
||||
isLoading: false,
|
||||
isAuthenticated: true,
|
||||
user: {
|
||||
userId: '1105261382487539712',
|
||||
userName: '本地调试',
|
||||
permissionLevel: 'full',
|
||||
depName: '',
|
||||
roles: ['BI-SCHEDULE-OPT'],
|
||||
},
|
||||
error: null,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@ import type { JwtPayload, AuthUser } from './types.js';
|
||||
const JWT_SECRET = process.env.JWT_SECRET || 'ln-bi-default-secret';
|
||||
|
||||
// 临时:跳过所有认证(保留完整逻辑便于快速恢复)
|
||||
const BYPASS_AUTH = false;
|
||||
// 临时:本地开发跳过认证
|
||||
const BYPASS_AUTH = true;
|
||||
|
||||
export async function authMiddleware(c: Context, next: Next) {
|
||||
const path = c.req.path;
|
||||
|
||||
Reference in New Issue
Block a user