You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to call enforce it throws a ClassCastException.
java.lang.ClassCastException: <String, > is not a javaType
at com.googlecode.aviator.runtime.function.FunctionUtils.getJavaObject(FunctionUtils.java:107)
at org.casbin.jcasbin.util.BuiltInFunctions$1.variadicCall(BuiltInFunctions.java:354)
at com.googlecode.aviator.runtime.function.AbstractVariadicFunction.call(AbstractVariadicFunction.java:71)
at Script_1644402524748_59/70807318.execute0(Script_1644402524748_59:1)
at com.googlecode.aviator.ClassExpression.executeDirectly(ClassExpression.java:44)
at com.googlecode.aviator.BaseExpression.execute(BaseExpression.java:237)
at org.casbin.jcasbin.main.CoreEnforcer.enforce(CoreEnforcer.java:478)
at org.casbin.jcasbin.main.CoreEnforcer.enforce(CoreEnforcer.java:590)
at com.w.platform.rbac.MCEnforcer.enforce(MCEnforcer.java:95)
I made some investigation myself, I found that the g(rouping)-function expects that the arguments are AviatorJavaObjects (fx. p.dom) and just fails when it receives a raw string. But keyGet2 returns string so it feels that it is impossible to use keyGet2 within a group match function.
PS. the exact same configuration: same policies, groups, model, request works as intended in the online editor, https://casbin.org/en/editor/
The text was updated successfully, but these errors were encountered:
Hi there,
I created a matcher that extracts a string from a given request object, and checks if that is in a given group:
g4(keyGet2(r.obj, "/customer/:cid/*", "cid"), p.dom )
When I try to call
enforce
it throws aClassCastException
.I made some investigation myself, I found that the g(rouping)-function expects that the arguments are
AviatorJavaObject
s (fx.p.dom
) and just fails when it receives a raw string. ButkeyGet2
returns string so it feels that it is impossible to usekeyGet2
within a group match function.PS. the exact same configuration: same policies, groups, model, request works as intended in the online editor, https://casbin.org/en/editor/
The text was updated successfully, but these errors were encountered: