Available EL expressions in the OIM user context

Available EL expressions in the Oracle Identity Manager user context:

EL Description
#{oimcontext.currentUser['ATTRIBUTE_NAME']}
Access value of the ATTRIBUTE_NAME attribute of the logged-in user.For the list of default attributes defined for the user entity, see “Attribute Definitions” in theOracle Fusion Middleware Administrator’s Guide for Oracle Identity Manager.
#{oimcontext.currentUser['UDF_NAME']}
Access value of the UDF_NAME attribute of the logged-in user. UDF attributes can be defined by using the Form Designer.
#{oimcontext.currentUser.roles}
Access the ROLE_NAME and RoleEntity mapping that contains the roles assigned to the logged-in user. RoleEntity is Java Bean having name, description, key, and displayName properties.
#{oimcontext.currentUser.roles['SYSTEM ADMINISTRATORS'] != null}
Boolean EL that evaluates to true if the logged-in user has the System Administrator admin role. Similarly, you can modify the EL to check for any other role.
#{oimcontext.currentUser.adminRoles['OrclOIMSystemAdministrator'] != null}
Boolean EL that evaluates to true if the logged-in user has the OrclOIMSystemAdministrator admin role. Similarly, you can modify the EL to check for any other admin role.

We can use EL expression to retrieve all available user attribute values from the oimcontext bean, as shown in the following examples:

  • To get the user key of the currently logged-in user:
    #{oimcontext.currentUser.usr_key}

    OR:

    #{oimcontext.currentUser['usr_key']}
  • To get the list of role names of the currently logged-in user:
    #{oimcontext.currentUser.roles}
  • To get the list of admin role names of the currently logged-in user:
    #{oimcontext.currentUser.adminRoles}

If we want to display a message with the user login name when a user logs in to Oracle Identity Self Service, then we can use EL expression to retrieve the login name of the currently logged-in user, like:

#{oimcontext.currentUser['User Login']}

Leave a Reply

Your email address will not be published. Required fields are marked *