Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Excerpt

Accessing uPortal groups and user attributes from the portlet environment.

One of the main issues we encountered when developing portlets is that the portal and the portlets run in different Tomcat contexts, which prevents from accessing the portal objects from the portlets, in particular, the groups and the user attributes (Note: hopefully this separation has many advantages).

JSR-168 Support for Roles and User Attributes

...

To make a role available to your application, include a security-role-ref element in your portlet.xml for each desired role. This declaration should be outside the portlet declarations.

Role names are the name your portlet will use to denote a particular portal group. This name may be anything you like and is visible only to the portlet. The role link value must match either the fully qualified key (serviceName.groupKey) or display name of an existing uPortal group. For example, you might have any of the following styles of declarations:

Code Block
xml
xml
<security-role-ref>
    <role-name>everyone</role-name>
    <role-link>local.0<link>Everyone</role-link>
</security-role-ref>
<security-role-ref>
    <role-name>student</role-name>
    <role-link>local.34</role-link>
</security-role-ref>
<security-role-ref>
    <role-name>undergraduates</role-name>
    <role-link>pags.3</role-link>
</security-role-ref>

...

TODO: Describe UserInfoService API.

Other Options

The package esup-portal-ws solves this issue by providing Esup-Portail has offers a web service (executed hosted by uPortal and interrogated by the portlets) which that gives access to the portal groups and user attributes.
Documentation and downloads are More information about this add-on is available at httphttps://sourcesupwiki.cru.frjasig.org/display/UPC/esup-portal-ws. We think that this project can be useful for the whole JASIG community, especially the people who develop portlets or port existing uPortal channels to portlets, and who want to keep a close integration between their portlets and the portal Information System.
PA+-+a+web+service+to+publish+groups+and+user+attributes.