Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(SaInterceptor): 增加prePathAuth功能 #604

Closed
mymx2 opened this issue Apr 9, 2024 · 1 comment
Closed

feat(SaInterceptor): 增加prePathAuth功能 #604

mymx2 opened this issue Apr 9, 2024 · 1 comment

Comments

@mymx2
Copy link

mymx2 commented Apr 9, 2024

建议增加的新功能:

增加SaInterceptor拦截器前置拦截功能。

验证场景顺序:
prePathAuth(前置验证,无错误则通过) -> annotaionAuth(错误则不通过) -> postAuth(错误则不通过)

应用场景阐述:

用户在某些场景下,无需后续校验:

  • 如果用户 id = 1
  • 如果用户 role=superadminadmin
  • 如果用户 permission=*.*.****
  • 如果用户是某个租户
  • 如果用户访问某个特定的路径
// prePassAuth 校验, 通过则不继续校验
if (prePassAuth != null) {
	try {
		prePassAuth.run(handler);
		return true;
	} catch (Exception ignore) {}
}

image
image

@mymx2
Copy link
Author

mymx2 commented Apr 9, 2024

closed

@mymx2 mymx2 closed this as completed Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant