Hello everyone,
I’m making a web app using Weweb Auth system, I have 2 different user roles and user groups matching this. I have private pages which are reachable with specific roles and it works.
In my navbar I have link buttons that enable to navigate to these pages but, obviously, I want to dynamically hide the buttons to the same users that can’t access to these pages.
I tried something like this in the conditionnal rendering/ display attribute :
return wwFormulas.contains(pluginVariables[ ‘6a64802c-52f8-4637-9932-580bf178aaa7’][‘user’]?.[‘roles’], wwFormulas.createObject(“id”, “fd8715a191bd4cbe8da4f5a4ab0a6498”, “name”, “Admin”));
(The object values matches my admin user role ones).
I know it’s a bit dirty but anyway, it doesn’t works.
I asked to Weweb AI agent and he told me to do almost the same thing, but neither works.
Can someone help me ?