tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: how to get the group info of an authenticated user
Date Wed, 10 Jan 2001 21:37:57 GMT
Jie Yao wrote:

> Is there a way to get the group info of an anthenticated user? If yes,
> how can this be associated with the role info in a HttpServletRequest?

The servlet API does not have any concept of a "group" -- most people treat
roles as groups, however, because you can assign a role to more than one user
(and a user can be assigned more than one role).

You can ask if the current user is a member of a specific group like this:

    if (request.isUserInRole("manager")) {
        ... this person is a manager ...

> Thanks.
> Jie Yao

Craig McClanahan

View raw message