是"isUserInRole"吗?与JAAS有关的方法? [英] Is "isUserInRole" method related to JAAS?

查看:60
本文介绍了是"isUserInRole"吗?与JAAS有关的方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在glassfish 3.0中配置了JAAS,并使用JDBCRealm对用户进行身份验证.它工作正常,并且URL受限制.但是方法 #{facesContext.externalContext.isUserInRole('admin')}始终返回false,即使已登录的用户是admin.我也在数据库中为组名"和映射文件中的角色名"都设置了"admin",并且用户为admin.可能是什么问题?

I've configured JAAS in glassfish 3.0 and used JDBCRealm for authenticating users. It's working properly and URL(s) are restricted. But the method #{facesContext.externalContext.isUserInRole('admin')} always returns false, even when the logged in user is admin.I've set "admin" for both "group name" in my database and for "role name" in the mapping file and the user is admin. What might be the problem?

推荐答案

在servlet容器中,角色映射描述符.

In a servlet container, isUserInRole is just a call to the underlying servlet method. I would double-check the role mappings in the deployment descriptor.

这篇关于是"isUserInRole"吗?与JAAS有关的方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆