Request Messages for Authorizing Access to Components
This section discusses request messages for authorizing access to components and provides code examples of request messages.
IsMenuItemAuthorized
If menu, component and component item name are available, the IsMenuItemAuthorized function call can be used to get authorization. Note that barname and itemname are obtained using menu, market and component name.
If component item name is not available, then the IsMenuItemAuthorized function is invoked for each component item name (page) in the component. The user is provided access even if he or she has access to one of the pages in the component.
Action mode (Update, Update/Display) and other service parameters that need to be passed on to the authorization service application class can be passed to the IsMenuItemAuthorized function through the KEYVAL element with the keyname ACTION . See the Authorization Service Request Message Elements chart presented earlier in this section for additional information about using the KEYVAL element and the key name ACTION.
Component Authorization Request Messages: Component Name and Action Mode are Available
The following pseudocode shows an example of the PARAMS section of a request message for authorizing access to a component when the component item name and action mode are available:
<PARAMARRAY>
<PARAMS>
<SERVICEID>1</SERVICEID>
<SERVICE_TYPE>UPGE</SERVICE_TYPE>
<MENU>APPLICATION_ENGINE</MENU>
<COMPONENT>AE_TOOLS</COMPONENT>
<COMP_ITEM_NAME>COMP_ITEM_NAME</COMP_ITEM_NAME>
<MARKET>GBL</MARKET>
<KEYVAL>ACTION=U</KEYVAL>
<NODE>PT_LOCAL</NODE>
</PARAMS>
</PARAMARRAY>
Component Authorization Request Messages: Action Type is Not Available
The following pseudocode shows an example of the PARAMS section of a request message for authorizing access to a component when the action type is not available. In such cases the action type is determined by the code:
<PARAMARRAY>
<PARAMS>
<SERVICEID>1</SERVICEID>
<SERVICE_TYPE>UPGE</SERVICE_TYPE>
<MENU>APPLICATION_ENGINE</MENU>
<COMPONENT>AE_TOOLS</COMPONENT>
<COMP_ITEM_NAME> COMP_ITEM_NAME</COMP_ITEM_NAME>
<MARKET>GBL</MARKET>
</PARAMS>
</PARAMARRAY>
Component Authorization Request Messages: Component Item Name is Not Available
If a component item name is not present then it is derived as follows: For each of the pages in the component the IsMenuItemAuthorized function is invoked by passing the component item name of each page; if the user has access to the component for at least one of the pages in the component the authorization service will return true.
The following pseudocode shows an example of the PARAMS section of a request message for authorizing access to a component when the component item name is not available, but values for PORTAL and MARKET elements are available:
<PARAMARRAY>
<PARAMS>
<SERVICEID>1</SERVICEID>
<SERVICE_TYPE>UPGE</SERVICE_TYPE>
<NODE>PT_LOCAL</NODE>
<MENU>APPLICATION_ENGINE</MENU>
<COMPONENT>AE_TOOLS</COMPONENT>
<MARKET>GBL</MARKET>
<PORTAL>EMPLOYEE</PORTAL>used ]
</PARAMS>
</PARAMARRAY>
The following pseudocode shows an example of the PARAMS section of a request message for authorizing access to a component when no values for COMP_ITEM_NAME, PORTAL or MARKET elements are specified. The value for PORTAL is defaulted to the portal of the default provider node; the value for MARKET is defaulted to GBL.
<PARAMARRAY>
<PARAMS>
<SERVICE_TYPE>UPGE</SERVICE_TYPE>
<NODE>PT_LOCAL</NODE>
<MENU>APPLICATION_ENGINE</MENU>
<COMPONENT>AE_TOOLS</COMPONENT>
</PARAMS>
</PARAMARRAY>