struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Struts Newsgroup (@Basebeans.com) <str...@basebeans.com>
Subject Re: How to do 'isUserInRole(unauthenticated)'?
Date Wed, 24 Apr 2002 16:40:02 GMT
Subject: Re: How to do 'isUserInRole(unauthenticated)'?
From: Torgeir Veimo <torgeir@vertech.no>
 ===
jfc100 wrote:
> Struts Newsgroup (@Basebeans.com) wrote:
> 
>> Subject: Re: How to do 'isUserInRole(unauthenticated)'?
>> From: Torgeir Veimo <torgeir@vertech.no>
>> ===
>> jfc100 wrote:
>>
>>> Is it possible to determine by calling 
>>> isUserInRole('unauthenticated'), where 'unauthenticated' is an 
>>> identifier of the anonymous (i.e. the not-logged-in) user?
>>>
>>
>> A unauthenticated user will make the getUserPrincipal() method return 
>> a null for principal.
>>
> ok, but what if I want to select a tiles definition based on the 
> unauthenticated user like:
> 
> 
> <definition name="user.login.welcome" 
> page="user/login/anonymous/welcome.jsp" role="anonymous" />
> 
> Is there a way to associate the 'nobody' (as specified in the 
> 'unauthenticatedIdentity' att of the login module) or the null user with 
> a role or group?

I'm not shure about this, but we have our own realm implementation, and 
we attach the role Authenticated to each logged in user, so we can check 
for that role. I guess using struts logic taglib can provide the 
necessary logic to do something when the user doesn't have the role 
Authenticated.


-- 
-Torgeir


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message