You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by "Shorney, Rob" <Ro...@northgate-is.com> on 2002/10/30 20:44:29 UTC

Need help with Users security roles

How do I get the description of the role, at present I have the following in
the getContent() method of the protlet

    try
    {
      Iterator roles =
JetspeedRoleManagement.getRoles(runData.getUser().getUserName());
      while (roles.hasNext()) {
        tr = (org.apache.turbine.om.security.TurbineRole) roles.next();
        text.append("role = " + tr.getName());
        text.append("<br>");
      }
    }
    catch (org.apache.jetspeed.services.security.JetspeedSecurityException
jse)
    {

which displays the following

role = org.apache.jetspeed.om.security.turbine.TurbineRole@1f
role = org.apache.jetspeed.om.security.turbine.TurbineRole@7c


Regards

Rob Shorney
PDS - Local Government - Front Office Development Team
Northgate Information Solutions
----------------------------------------------------------------------------
--------




 
This email is sent on behalf of Northgate Information Solutions UK Limited ("Northgate") and is strictly confidential and intended solely for the addressee(s).  It may contain personal and confidential information and as such may be protected by the Data Protection Act 1998.

If you are not the intended recipient of this email you must: (i) not disclose, copy or distribute its contents to any other person nor use its contents in any way or you may be acting unlawfully;  (ii) contact Northgate immediately on +44 (0)1442 232424 quoting the name of the sender and the addressee then delete it from your system.

Any views or opinions expressed within this email are those of the author, and do not necessarily represent those of Northgate.

Northgate has scanned this email for viruses but does not accept any responsibility once this email has been transmitted.  You should scan attachments (if any) for viruses.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Need help with Users security roles

Posted by David Sean Taylor <da...@bluesunrise.com>.
>
> Hi,
>
> Try to use org.apache.jetspeed.om.security.BaseTurbineUser instead of
> org.apache.turbine.om.security.TurbineRole
>

Your advising to use the default implementation instead of the interface?
Thats bad advice!

The Role interface has a getName method which correctly retrieves the name
of the role from any implementation.



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Need help with Users security roles

Posted by Maciej Dziergwa <ma...@icpnet.pl>.
Użytkownik Shorney, Rob napisał:
> How do I get the description of the role, at present I have the following in
> the getContent() method of the protlet
> 
>     try
>     {
>       Iterator roles =
> JetspeedRoleManagement.getRoles(runData.getUser().getUserName());
>       while (roles.hasNext()) {
>         tr = (org.apache.turbine.om.security.TurbineRole) roles.next();
>         text.append("role = " + tr.getName());
>         text.append("<br>");
>       }
>     }
>     catch (org.apache.jetspeed.services.security.JetspeedSecurityException
> jse)
>     {
> 
> which displays the following
> 
> role = org.apache.jetspeed.om.security.turbine.TurbineRole@1f
> role = org.apache.jetspeed.om.security.turbine.TurbineRole@7c
> 
> 
> Regards
> 
> Rob Shorney
> PDS - Local Government - Front Office Development Team
> Northgate Information Solutions
> ----------------------------------------------------------------------------
> --------
> 


Hi,

Try to use org.apache.jetspeed.om.security.BaseTurbineUser instead of 
org.apache.turbine.om.security.TurbineRole

MaciekD



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>