This is an automated email from the ASF dual-hosted git repository.
zhangjidi2016 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/rocketmq-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new 6da21f4 Configure the dlq message interface path in the
authInterceptor (#65)
6da21f4 is described below
commit 6da21f480ed28cbc973cf9f82184b88c87785e78
Author: zhangjidi2016 <[email protected]>
AuthorDate: Wed Jan 12 18:48:44 2022 +0800
Configure the dlq message interface path in the authInterceptor (#65)
Co-authored-by: zhangjidi2016 <[email protected]>
---
.../config/AuthWebMVCConfigurerAdapter.java | 27 +++++++++++-----------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git
a/src/main/java/org/apache/rocketmq/dashboard/config/AuthWebMVCConfigurerAdapter.java
b/src/main/java/org/apache/rocketmq/dashboard/config/AuthWebMVCConfigurerAdapter.java
index accc5ab..4c240fd 100644
---
a/src/main/java/org/apache/rocketmq/dashboard/config/AuthWebMVCConfigurerAdapter.java
+++
b/src/main/java/org/apache/rocketmq/dashboard/config/AuthWebMVCConfigurerAdapter.java
@@ -50,17 +50,18 @@ public class AuthWebMVCConfigurerAdapter extends
WebMvcConfigurerAdapter {
public void addInterceptors(InterceptorRegistry registry) {
if (configure.isLoginRequired()) {
registry.addInterceptor(authInterceptor).addPathPatterns(
- "/cluster/**",
- "/consumer/**",
- "/dashboard/**",
- "/message/**",
- "/messageTrace/**",
- "/monitor/**",
- "/rocketmq/**",
- "/ops/**",
- "/producer/**",
- "/test/**",
- "/topic/**");
+ "/cluster/**",
+ "/consumer/**",
+ "/dashboard/**",
+ "/dlqMessage/**",
+ "/message/**",
+ "/messageTrace/**",
+ "/monitor/**",
+ "/rocketmq/**",
+ "/ops/**",
+ "/producer/**",
+ "/test/**",
+ "/topic/**");
}
}
@@ -75,9 +76,9 @@ public class AuthWebMVCConfigurerAdapter extends
WebMvcConfigurerAdapter {
@Override
public Object resolveArgument(MethodParameter methodParameter,
ModelAndViewContainer modelAndViewContainer,
- NativeWebRequest nativeWebRequest,
WebDataBinderFactory webDataBinderFactory) throws Exception {
+ NativeWebRequest nativeWebRequest, WebDataBinderFactory
webDataBinderFactory) throws Exception {
UserInfo userInfo = (UserInfo)
WebUtil.getValueFromSession((HttpServletRequest)
nativeWebRequest.getNativeRequest(),
- UserInfo.USER_INFO);
+ UserInfo.USER_INFO);
if (userInfo != null) {
return userInfo;
}