There’s currently no option to add conditional filters to the custom-code block. The way I’ve been building out permissions is at the page level, I set the user group as either “admin” or “user”. Then at the block level, I specify:
logged-in user's company = "ABC COMPANY"
This allows us to scale the application out and use the same page and block setup for each client company and just update the conditional filter as needed.
Is there a code-based workaround to add conditional features to a custom-code block to achieve this?
Another workaround is, pass company name and the group name as url paramerter. And then it can be read by custom code.
In custom code, all the columns of User table is already present.