You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beehive.apache.org by "Rich Feit (JIRA)" <de...@beehive.apache.org> on 2005/09/27 06:05:48 UTC
[jira] Resolved: (BEEHIVE-941) Need APIs for getUserPrincipal/isUserInRole, when a custom LoginHandler is configured
[ 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