Yes you can, but only for portlets that are running in the uPortal webapp. Part of the API used for this ended up having to change since the RC3 release so I'll include instructions for both.

In the RC3 release and earlier:
-Use the PortletContainerUtils static service to get the portal's HttpServletRequest from the PortletRequest -Inject the IPersonManager (personManager bean name) into your class and use it to get the IPerson for the portal's HttpServletRequest

In 3.0 code from today on:
-Inject the IPortalRequestUtils (portalRequestUtils bean name) into your class and use it to get the portal's HttpServletRequest from the PortletRequest -Inject the IPersonManager (personManager bean name) into your class and use it to get the IPerson for the portal's HttpServletRequest


The change that happened today was refactoring PortletContainerUtils from a static service to a managed bean. The methods are exactly the same. Here is the related changeset:
http://developer.ja-sig.org/source/changelog/jasigsvn/uPortal/trunk?cs=43524

-Eric

Thomas S. Pangborn wrote:
Is there a way to capture or determine what the current IPerson is for a given portlet? i.e. Can I determine the user who is actually running the current portlet?

Thomas
--


Join your friends and colleagues at JA-SIG 2008 - "Higher Education Solutions: The Community Source Way!" April 27th - 30th, 2008 in St. Paul, Minnesota USA


Featuring CAS, DSpace, Fedora, Fluid, Internet2, Kuali, Sakai, uPortal, and more! Information/Registration at: http://www.ja-sig.org/conferences/08spring/index.html


Subscribe to the conference blog, The Community Source Way http://jasig2008.blogspot.com <http://jasig2008.blogspot.com/>, for news and updates about the event.


Join the Conference networking site at http://ja-sigspring08.crowdvine.com/


You are currently subscribed to [email protected] as: [EMAIL 
PROTECTED]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to