Forum Stats

  • 3,873,340 Users
  • 2,266,537 Discussions
  • 7,911,515 Comments

Discussions

HCM Cloud Navigation EL Expression for Custom Role not Working

Dan Belli
Dan Belli Member Posts: 2 Red Ribbon
edited Dec 17, 2019 11:06AM in HCM Cloud Service

I have created a custom role and want to hide some navigation using an EL expression in structure. I have created the role, assigned myself the role and written the EL expression:

#{!(securityContext.userInAllRoles['WM_PAYSLIP_ONLY'])}

(Document attached with screenshots)

This is being returned as TRUE when in fact it should be FALSE since my user account has the role. This works for our other custom roles but not this one. I feel like I may be missing a bit of configuration which allows me to use this role for the navigation EL Expression.

Can someone please give me any insights?

Thanks in advance,

Dan

Answers

  • AshishHCM
    AshishHCM Oracle HCM Cloud Solution Architect Member Posts: 334 Bronze Crown
    edited Dec 17, 2019 7:59AM

    Is this working fine when you test the role.

    Is this a Job Role / Duty Role.

    In which domain/stripe have you defined this role (fscm, hcm,obi)

    You would need to ensure that endpoint URL points to same domain where you have created role like should have fscm/Fuse, hcm/Fuse ... etc

    Kind Regards

    Ashish

  • Evan.R
    Evan.R Member Posts: 19
    edited Dec 17, 2019 10:50AM

    Hi Dan,

    Try below expression if that works. Also if you feel that it gives true instead of false, apply it and test it for other users and check run time outcome.

    #{!securityContext.userInRole['role1,role2,roleN']}

    Kind Regards,

    Evan

  • Dan Belli
    Dan Belli Member Posts: 2 Red Ribbon
    edited Dec 17, 2019 11:06AM

    What do you mean when you say check run time outcome?