I have a bind variable (i.e. “bindVariableName“) defined in view object query scope. It is based on groovy expression which access ADF security context. In particular I try to verify whether user is in certain role: adf.context.securityContext.isUserInRole(“RoleName”). And get an exception:
JBO-25186: Exception in expression “IsPlanAssumptProvideAssigned” of unknown type : oracle.jbo.ExprSecurityException
Looks that ADF does not execute groovy expression if it seems to be risky in terms of security and is marked as untrusted.
Mark groovy expression as trusted. By default expression is treated as trusted, so simply remove attribute trustMode from the Expression tag or change to trusted:
<Variable Name="bindVariableName" Kind="where" Type="java.lang.String"> <TransientExpression Name="VariableScript" trustMode="trusted"><![CDATA[adf.context.securityContext.isUserInRole("RoleName")]]></TransientExpression> </Variable>
ADF Version 184.108.40.206.0