Yes, but how can you see who is currently logged in?

-----Ursprüngliche Nachricht-----
Von: Luc Fouin [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 8. Juli 2005 07:54
An: Jetspeed Users List
Betreff: Re: getting information about which role/user is logged in ?


Sascha a écrit :
> Hello,
hi,

> 
> Is it possible that my Java portlet gets the information which user/role
> is currently logged in?

usually, you can get get the username with a 
*request.getUserPrincipal()* which gets you a Principal 
http://java.sun.com/j2se/1.5.0/docs/api/java/security/Principal.html

i don't think you can get the roles directly, but, you can check them 
with a *request.isUserInRole(String role)*...


Luc

-- 
Luc FOUIN - Stagiaire Aptiwan
14 rue Niepce
75014 Paris
Tél : 06 77 95 17 24
Mél : luc*DOT*fouin*AT*aptiwan*DOT*com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to