beehive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rich Feit (JIRA)" <...@beehive.apache.org>
Subject [jira] Resolved: (BEEHIVE-941) Need APIs for getUserPrincipal/isUserInRole, when a custom LoginHandler is configured
Date Tue, 27 Sep 2005 04:05:48 GMT
     [ http://issues.apache.org/jira/browse/BEEHIVE-941?page=all ]
     
Rich Feit resolved BEEHIVE-941:
-------------------------------

    Fix Version: 1.1
                     (was: TBD)
     Resolution: Fixed
      Assign To: Alejandro Ramirez  (was: Rich Feit)

Fixed with revision 291814.

> 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: Alejandro Ramirez
>      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