Is "isUserInRole" method related to JAAS?
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 f开发者_如何学Cor "role name" in the mapping file and the user is admin. What might be the problem?
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.
精彩评论