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 "Bernie, Miles R (UK - London)" <mb...@deloitte.co.uk> on 2005/04/26 14:28:33 UTC
Jetspeed2 subject role access
Hello.
Can anyone tell me how I access a subjects assigned jetspeed roles from
my portlet?
I can access the principal in the usual way but am unsure how to access
the roles from there.
The Jetspeed 2 Security Documentation has a section on Role Based Access
Control:
"If a user has the role [roleA] then, user.getSubject().getPrincipals()
returns:
-/role/roleA
-/role/roleA/roleB
-/role/roleA/roleB/roleC"
This is exactly what I'm after but I don't know how to get to the
Subject from within my portlet.
Looking in the AbstractSecurityValve is see:
(Subject)request.getRequest().getSession().getAttribute(PortalReservedPa
rameters.SESSION_KEY_SUBJECT);
But I have had no luck with this.
Am I missing something vital?
Any help would be great.
Thanks all
m
IMPORTANT NOTICE
If you have received this e-mail in error or wish to read our e-mail disclaimer statement and monitoring policy, please refer to the statement below or contact the sender.
This communication is from Deloitte MCS Limited whose registered office is at Hill House, 1 Little New Street, London EC4A 3TR, United Kingdom. Registered in England No 3311052.
This communication and any attachments contain information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of disclosure, distribution, copying or use of this communication or the information in it or in any attachments is strictly prohibited and may be unlawful. If you have received this communication in error, please return it with the title "received in error" to IT.SECURITY.UK@deloitte.co.uk then delete the email and destroy any copies of it.
E-mail communications cannot be guaranteed to be secure or error free, as information could be intercepted, corrupted, amended, lost, destroyed, arrive late or incomplete, or contain viruses. We do not accept liability for any such matters or their consequences. Anyone who communicates with us by e-mail is taken to accept the risks in doing so.
When addressed to our clients, any opinions or advice contained in this e-mail and any attachments are subject to the terms and conditions expressed in the governing Deloitte MCS Limited client engagement letter.
Opinions, conclusions and other information in this e-mail and any attachments which do not relate to the official business of the firm are neither given nor endorsed by it.