[FEATURE-1855] Security Level Name in Expression

Hi,

Is there any way to get the name of the security level that you are defining a rule expression for?
I would something that would return ‘testLevel’ in the place of {this.levelName}

runscript("Security.roles.test('"+{this.levelName}+"','"+{attribute-source:idTokenClaims:preferred_username}+"')")

This way I can have the same expression for every level, and the script module can apply the rules.

Regards,
Deon

Unfortunately I do not see a way to grab the security level name from the expression, so I’m afraid you’ll have to hard-code the name into each rule for now. I’ve added an internal feature ticket to add the ability to grab the name.

1 Like