【问题标题】:Redirect to url based on user role in Websphere根据 Websphere 中的用户角色重定向到 url
【发布时间】:2017-11-29 18:34:59
【问题描述】:

我需要将具有特定用户角色的用户定向到特定 URL。这可以在 WebSphere 中完成吗?如果有,怎么做?

【问题讨论】:

  • 我只是在登录时在 bean 中使用 HttpServletRequest#isUserInRole("Role") 将它们重定向到正确的 URL

标签: websphere url-redirection user-roles


【解决方案1】:

您可以使用 isUserInRole() 如下,其中 req 是 HttpServletRequest

if (req.isUserInRole("myRole")){
        ...

}

更多详情: Developing with programmatic security APIs for web applications

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-09-17
    • 1970-01-01
    • 2017-11-19
    • 1970-01-01
    • 2011-04-10
    • 2018-09-01
    • 1970-01-01
    • 2018-07-02
    相关资源
    最近更新 更多