Symantec IGA

 View Only
Expand all | Collapse all

Using getEntitlement API / Presenting Alert When Check a Specific Permission

  • 1.  Using getEntitlement API / Presenting Alert When Check a Specific Permission

    Posted Mar 24, 2020 11:25 AM

    I'm trying to display an alert (prompt) when a user selects a specific role in Access Module of Identity Portal using api.getEntitlement() context. I've checked this possibility in product documentation: https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/layer7-identity-and-access-management/identity-portal/14-3/programming/ca-identity-portal-developer-guide/form-handlers/api-context.html. However, the function never shows any value when we try to recover it to check the selected role.

    Identity Portal documentation does not present any example or details of this function implementation. Just says that is to recover permission details in Access Module, that is what I need.

    The only KB sent to me is the following one: https://knowledge.broadcom.com/external/article?articleId=133160

    So, is that a way to prompt this alert when I click add permission button?



  • 2.  RE: Using getEntitlement API / Presenting Alert When Check a Specific Permission
    Best Answer

    Broadcom Employee
    Posted Mar 24, 2020 09:11 PM
    Edited by Lucas Alves Mar 25, 2020 08:27 AM
    The doc says "Returns a value only if used within forms in the Access Module." So you have to use this api.getEntitlement() function within a form that being used in the Access Module. Normally such a form is blank, i.e. without any field/property specified. 

    I tested in the lab, adding one field, i.e. Full Name, in the form and populate the Initialization handler calling api.getEntitlement() like below.


    If you notice I output api.getEntitlement() result using console.log(). This will output to Chrome/Browser Developer Tool's console.
    When I assign the Permission, the Form will appear and here what I get in the Developer Tool's console.

    To prompt a dialog you can use alert(), e.g. alert(entitlement.name) in the handler.