beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Ramirez (JIRA)" <...@beehive.apache.org>
Subject [jira] Assigned: (BEEHIVE-941) Need APIs for getUserPrincipal/isUserInRole, when a custom LoginHandler is configured
Date Mon, 19 Dec 2005 17:38:32 GMT
     [ http://issues.apache.org/jira/browse/BEEHIVE-941?page=all ]

Alejandro Ramirez reassigned BEEHIVE-941:
-----------------------------------------

    Assign To: Julie Zhuo  (was: Alejandro Ramirez)

please verify

> Need APIs for getUserPrincipal/isUserInRole, when a custom LoginHandler is configured
> -------------------------------------------------------------------------------------
>
>          Key: BEEHIVE-941
>          URL: http://issues.apache.org/jira/browse/BEEHIVE-941
>      Project: Beehive
>         Type: Improvement
>   Components: NetUI
>     Versions: V1
>     Reporter: Rich Feit
>     Assignee: Julie Zhuo
>      Fix For: 1.1

>
> This was identified by Adam Jenkins.  If you override container-managed login handling
using your own LoginHandler, there's currently no easy way to get the current logged-in user,
or to test whether the user is in a particular role.  You need to do something like this:
>     FlowControllerHandlerContext fcContext = new FlowControllerHandlerContext(getRequest(),
getResponse(), this);
>     boolean loggedIn = (Handlers.get(getServletContext()).getLoginHandler().getUserPrincipal(fcContext)
!= null);
> There should be some methods on FlowController, which would be sensitive to a custom
LoginHandler:
>     protected UserPrincipal getUserPrincipal();
>     protected boolean isUserInRole(String roleName);

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message