I am using Leap 9.3.3.0_37 and I have an app with both dynamic and static user roles. While I'm testing the app, I have needed to test the experience in a role I am not normally in. As part of this, I wrote some code to set section editability based on whether or not the user's role contains a certain word. It is returning a partial list of roles I am in, but it does not return roles I am hard-coded in (via the app editor) or those that I was added to using the stage action button activity (Assign Users).
Is there a workaround for this?
Here is the code I am calling:
console.log(app.getCurrentUserRoles().toString().includes("BLDG"));
It's returning:
Administrator,Record Owner,EDG Ops,Initiator,BLDG Test Responder
But it should be returning all of that and BLDG Lead (manual add, see below) and BLDG Senior Manager (dynamic).