ClassName

atg.userprofiling.HasEffectivePrincipal

Component

/atg/dynamo/droplet/HasEffectivePrincipal

The HasEffectivePrincipal servlet bean checks whether a user has a specified identity and renders content based on the result of its query. For example, you can check if the user has a specific principal (identity), if the user is a member of a specified organization, or if the user has a specified role, and you can set this servlet bean to render that information.

Input Parameters

type
You must set this required parameter to one of the following four values:

id
This input parameter represents the identity you want to look up. The value you specify depends on the value of the type parameter:

The best way to find a path for an organization or a global role is to look in the ACC People and Organizations task area. For example, you can find all global roles in the People and Organizations task area, under the Roles option. By expanding the Global Roles tree option, you can navigate to each role by traversing its path.

Notice that id values can have a leading slash, but one is not required.

Open Parameters

output
This parameter is rendered if the identity check is successful.

default
This parameter is rendered if the identity check fails.

unknown
This parameter is rendered if the user has no known identity.

Example:

Use the HasEffectivePrincipal servlet bean to determine whether the current user is assigned the role of Administrator.

<dsp:droplet name="/atg/dynamo/droplet/HasEffectivePrincipal">
  <dsp:param name="type" value="role"/>
  <dsp:param name="id" value="Administrator"/>
  <dsp:oparam name="output"> You are an administrator<p> </dsp:oparam>
  <dsp:oparam name="default"> You are not an administrator<p> </dsp:oparam>
  <dsp:oparam name="unknown"> You are not logged in<p> </dsp:oparam>
</dsp:droplet>
 
loading table of contents...