I have a method on my User class which is a RenardeUser, etc.
I have a method called hasUserRole(String... roleNames) that I'd like to pass in a list of roles to check from my Qute templates in a single method call instead of multiple calls.
This works IF I pass in a list of roles like {#if inject:user && inject:user.hasUserRole("webadmin", "admin", "support")} but I get an exception during RUNTIME if I try to pass in a single value, ie. {#if inject:user && inject:user.hasUserRole("admin")}
The project compiles and starts up just fine but dies when I access the page with the single permission check.
Any ideas?
2023-02-26 17:27:11,348 ERROR [org.jbo.res.rea.com.cor.AbstractResteasyReactiveContext] (executor-thread-1) Request failed: java.lang.ClassCastException: class java.lang.String cannot be cast to class [Ljava.lang.String; (java.lang.String and [Ljava.lang.String; are in module java.base of loader 'bootstrap')
Hi,
I have a method on my User class which is a RenardeUser, etc.
I have a method called
hasUserRole(String... roleNames)
that I'd like to pass in a list of roles to check from my Qute templates in a single method call instead of multiple calls.This works IF I pass in a list of roles like
{#if inject:user && inject:user.hasUserRole("webadmin", "admin", "support")}
but I get an exception during RUNTIME if I try to pass in a single value, ie.{#if inject:user && inject:user.hasUserRole("admin")}
The project compiles and starts up just fine but dies when I access the page with the single permission check.
Any ideas?