mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 09:28:49 +08:00
not have authority access app tip
This commit is contained in:
parent
c3db084e3d
commit
13def2a4c3
@ -88,4 +88,13 @@ public class AuthorizeEndpoint extends AuthorizeBaseEndpoint{
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@RequestMapping("/authz/refused")
|
||||
public ModelAndView refused(){
|
||||
ModelAndView modelAndView = new ModelAndView("authorize/authorize_refused");
|
||||
Apps app = (Apps)WebContext.getAttribute(WebConstants.AUTHORIZE_SIGN_ON_APP);
|
||||
app.transIconBase64();
|
||||
modelAndView.addObject("model", app);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -139,6 +139,7 @@ public class MaxKeyMvcConfig implements WebMvcConfigurer {
|
||||
.addPathPatterns("/logon/oauth20/bind/**")
|
||||
.addPathPatterns("/logout")
|
||||
.addPathPatterns("/logout/**")
|
||||
.addPathPatterns("/authz/refused")
|
||||
;
|
||||
|
||||
_logger.debug("add Permission Interceptor");
|
||||
|
||||
@ -114,7 +114,7 @@ public class SingleSignOnInterceptor implements AsyncHandlerInterceptor {
|
||||
}
|
||||
}
|
||||
_logger.debug("preHandle not have authority access " + app);
|
||||
return false;
|
||||
response.sendRedirect(request.getContextPath()+"/authz/refused");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -17,6 +17,9 @@ login.session.timeout.tip=\u767B\u5F55\u4F1A\u8BDD\u8D85\u65F6
|
||||
login.session.timeout.prefix=\u60A8\u7684\u767B\u5F55\u4F1A\u8BDD\u5DF2\u7ECF\u8D85\u65F6\uFF0C\u8BF7
|
||||
login.session.timeout.suffix=\u91CD\u65B0\u767B\u5F55
|
||||
|
||||
login.authz.refuse=\u4F60\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u8BE5\u5E94\u7528\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002
|
||||
common.text.close=\u5173\u95ED
|
||||
|
||||
common.window.title=\u7A97\u53E3
|
||||
common.alert.title=\u63D0\u793A\u4FE1\u606F
|
||||
common.alert.closeText=\u5173\u95ED
|
||||
|
||||
@ -17,6 +17,9 @@ login.session.timeout.tip=Login session timeout
|
||||
login.session.timeout.prefix=Your login session has timed out. Please
|
||||
login.session.timeout.suffix=re-login
|
||||
|
||||
login.authz.refuse=You don't have authority to access this app, please contact the administrator.
|
||||
common.text.close=Close
|
||||
|
||||
common.window.title=Window
|
||||
common.alert.title=Information
|
||||
common.alert.closeText=Close
|
||||
|
||||
@ -17,6 +17,9 @@ login.session.timeout.tip=\u767B\u5F55\u4F1A\u8BDD\u8D85\u65F6
|
||||
login.session.timeout.prefix=\u60A8\u7684\u767B\u5F55\u4F1A\u8BDD\u5DF2\u7ECF\u8D85\u65F6\uFF0C\u8BF7
|
||||
login.session.timeout.suffix=\u91CD\u65B0\u767B\u5F55
|
||||
|
||||
login.authz.refuse=\u4F60\u6CA1\u6709\u6743\u9650\u8BBF\u95EE\u8BE5\u5E94\u7528\uFF0C\u8BF7\u8054\u7CFB\u7BA1\u7406\u5458\u3002
|
||||
common.text.close=\u5173\u95ED
|
||||
|
||||
common.window.title=\u7A97\u53E3
|
||||
common.alert.title=\u63D0\u793A\u4FE1\u606F
|
||||
common.alert.closeText=\u5173\u95ED
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html >
|
||||
<head>
|
||||
<title>Refuse To Access</title>
|
||||
<#include "authorize_common.ftl">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<center>
|
||||
<form id="refuse_form" name="refuse_form" action="" method="get">
|
||||
|
||||
<table style="width:400px">
|
||||
<tr>
|
||||
<td colspan='2'><@locale code="login.authz.refuse" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="${model.iconBase64}"/></td><td>${model.appName}</td>
|
||||
</tr>
|
||||
<tr style="display:none">
|
||||
<td>${model.id}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user