RE: Security - User Roles

2002-10-30 Thread Shorney, Rob
Hi,

Many thanks for this, however when I put this code in and compile I get the
following error.

I have put the code in the getContent() method

UserDetails.java: Error #: 360 : unreported exception:
org.apache.jetspeed.services.security.JetspeedSecurityException; must be
caught or declared to be thrown at line 35, column 45


Regards

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




-Original Message-
From: Maciej Dziergwa [mailto:mack5;icpnet.pl] 
Sent: 29 October 2002 21:30
To: Jetspeed Users List
Subject: Re: Security - User Roles


Hi,

Try this:

Iterator roles = 
JetspeedRoleManagement.getRoles(rundata.getJetspeedUser().getUserName());

MaciekD



 Hi,
 
 Please could someone supply some sample code on how to retrieve what roles
a
 user belongs to.
 
 I need to be able to determine this in either the init () or the
 getContent() methods as this will determine what html page to display in
the
 portlet.
 
 Many thanks in advance.
 
 
 Regards
 
 Rob Shorney
 PDS - Local Government - Front Office Development Team
 Northgate Information Solutions


--
To unsubscribe, e-mail:
mailto:jetspeed-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:jetspeed-user-help;jakarta.apache.org


 
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:   mailto:jetspeed-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:jetspeed-user-help;jakarta.apache.org




Re: Security - User Roles

2002-10-30 Thread Raffaele Ragni
Umm, if i remember right it seems that you are using a function that can
thrown an Exception, so you need to catch it or throw too.


|- Raffaele Ragni  [EMAIL PROTECTED] 
|- Tel 071 2900854 / Fax 071 2908551 / Cel 333 3659770
|- CONE Sistemi Informativi


- Original Message -
From: Shorney, Rob [EMAIL PROTECTED]
To: 'Jetspeed Users List' [EMAIL PROTECTED]
Sent: Wednesday, October 30, 2002 9:13 AM
Subject: RE: Security - User Roles


 Hi,

 Many thanks for this, however when I put this code in and compile I get
the
 following error.

 I have put the code in the getContent() method

 UserDetails.java: Error #: 360 : unreported exception:
 org.apache.jetspeed.services.security.JetspeedSecurityException; must be
 caught or declared to be thrown at line 35, column 45


 Regards

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


 -Original Message-
 From: Maciej Dziergwa [mailto:mack5;icpnet.pl]
 Sent: 29 October 2002 21:30
 To: Jetspeed Users List
 Subject: Re: Security - User Roles


 Hi,

 Try this:

 Iterator roles =
 JetspeedRoleManagement.getRoles(rundata.getJetspeedUser().getUserName());

 MaciekD



  Hi,
 
  Please could someone supply some sample code on how to retrieve what
roles
 a
  user belongs to.
 
  I need to be able to determine this in either the init () or the
  getContent() methods as this will determine what html page to display in
 the
  portlet.
 
  Many thanks in advance.
 
 
  Regards
 
  Rob Shorney
  PDS - Local Government - Front Office Development Team
  Northgate Information Solutions


 --
 To unsubscribe, e-mail:
 mailto:jetspeed-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:jetspeed-user-help;jakarta.apache.org



 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:
mailto:jetspeed-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:jetspeed-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:   mailto:jetspeed-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:jetspeed-user-help;jakarta.apache.org




RE: Security - User Roles

2002-10-30 Thread Shorney, Rob
Hi,

Again many thanks.

I have now put this into a try catch and that has sorted it out.

However, how do I get the description of the role, at present I have the
following

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




-Original Message-
From: Raffaele Ragni [mailto:raffaele.ragni;cone.it] 
Sent: 30 October 2002 08:27
To: Jetspeed Users List
Subject: Re: Security - User Roles

Umm, if i remember right it seems that you are using a function that can
thrown an Exception, so you need to catch it or throw too.


|- Raffaele Ragni  [EMAIL PROTECTED] 
|- Tel 071 2900854 / Fax 071 2908551 / Cel 333 3659770
|- CONE Sistemi Informativi


- Original Message -
From: Shorney, Rob [EMAIL PROTECTED]
To: 'Jetspeed Users List' [EMAIL PROTECTED]
Sent: Wednesday, October 30, 2002 9:13 AM
Subject: RE: Security - User Roles


 Hi,

 Many thanks for this, however when I put this code in and compile I get
the
 following error.

 I have put the code in the getContent() method

 UserDetails.java: Error #: 360 : unreported exception:
 org.apache.jetspeed.services.security.JetspeedSecurityException; must be
 caught or declared to be thrown at line 35, column 45


 Regards

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


 -Original Message-
 From: Maciej Dziergwa [mailto:mack5;icpnet.pl]
 Sent: 29 October 2002 21:30
 To: Jetspeed Users List
 Subject: Re: Security - User Roles


 Hi,

 Try this:

 Iterator roles =
 JetspeedRoleManagement.getRoles(rundata.getJetspeedUser().getUserName());

 MaciekD



  Hi,
 
  Please could someone supply some sample code on how to retrieve what
roles
 a
  user belongs to.
 
  I need to be able to determine this in either the init () or the
  getContent() methods as this will determine what html page to display in
 the
  portlet.
 
  Many thanks in advance.
 
 
  Regards
 
  Rob Shorney
  PDS - Local Government - Front Office Development Team
  Northgate Information Solutions


 --
 To unsubscribe, e-mail:
 mailto:jetspeed-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
 mailto:jetspeed-user-help;jakarta.apache.org



 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:
mailto:jetspeed-user-unsubscribe;jakarta.apache.org
 For additional commands, e-mail:
mailto:jetspeed-user-help;jakarta.apache.org




--
To unsubscribe, e-mail:
mailto:jetspeed-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail:
mailto:jetspeed-user-help;jakarta.apache.org

--
To unsubscribe, e-mail:   mailto:jetspeed-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:jetspeed-user-help;jakarta.apache.org




RE: Security - User Roles

2002-10-30 Thread ukasz Olek
Hi!
Ju must catch the exception that is thrown by getRoles():

try {
  Iterator roles =
 
JetspeedRoleManagement.getRoles(rundata.getJetspeedUser().getUserName())
;
}
catch (JetspeedSecurityException ex) {
 ...  //do something with ex
}

Greetings
Lukasz Olek

 -Original Message-
 From: Shorney, Rob [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 30, 2002 9:13 AM
 To: 'Jetspeed Users List'
 Subject: RE: Security - User Roles
 
 Hi,
 
 Many thanks for this, however when I put this code in and compile I
get
 the
 following error.
 
 I have put the code in the getContent() method
 
 UserDetails.java: Error #: 360 : unreported exception:
 org.apache.jetspeed.services.security.JetspeedSecurityException; must
be
 caught or declared to be thrown at line 35, column 45
 
 
 Regards
 
 Rob Shorney
 PDS - Local Government - Front Office Development Team
 Northgate Information Solutions


--
 --
 
 
 
 -Original Message-
 From: Maciej Dziergwa [mailto:[EMAIL PROTECTED]]
 Sent: 29 October 2002 21:30
 To: Jetspeed Users List
 Subject: Re: Security - User Roles
 
 
 Hi,
 
 Try this:
 
 Iterator roles =

JetspeedRoleManagement.getRoles(rundata.getJetspeedUser().getUserName())
;
 
 MaciekD
 
 
 
  Hi,
 
  Please could someone supply some sample code on how to retrieve what
 roles
 a
  user belongs to.
 
  I need to be able to determine this in either the init () or the
  getContent() methods as this will determine what html page to
display in
 the
  portlet.
 
  Many thanks in advance.
 
 
  Regards
 
  Rob Shorney
  PDS - Local Government - Front Office Development Team
  Northgate Information Solutions
 
 
 --
 To unsubscribe, e-mail:
 mailto:[EMAIL PROTECTED]
 For additional commands, e-mail:
 mailto:[EMAIL PROTECTED]
 
 
 
 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:   mailto:jetspeed-user-
 [EMAIL PROTECTED]
 For additional commands, e-mail: mailto:jetspeed-user-
 [EMAIL PROTECTED]


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




Security - User Roles

2002-10-29 Thread Shorney, Rob
Hi,

Please could someone supply some sample code on how to retrieve what roles a
user belongs to.

I need to be able to determine this in either the init () or the
getContent() methods as this will determine what html page to display in the
portlet.

Many thanks in advance.


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:   mailto:jetspeed-user-unsubscribe;jakarta.apache.org
For additional commands, e-mail: mailto:jetspeed-user-help;jakarta.apache.org




Re: Security - User Roles

2002-10-29 Thread Maciej Dziergwa

Hi,

Try this:

Iterator roles = 
JetspeedRoleManagement.getRoles(rundata.getJetspeedUser().getUserName());

MaciekD



Hi,

Please could someone supply some sample code on how to retrieve what roles a
user belongs to.

I need to be able to determine this in either the init () or the
getContent() methods as this will determine what html page to display in the
portlet.

Many thanks in advance.


Regards

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



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