How to restrict content within a page based on user group?
Issue
- I have a group defined and I have added users to it. How can I use liquid tags in a page to restrict what a user sees? I only want to show a certain snippet to a logged in user assigned to a certain group.
The below tags do not seem to be populated:
- {{ current_user}}
- {{ user}}
I would like to use:
{{ if "partner-group-name" in user.groups }}
show secrets
{{endif}}
Environment
- Red Hat 3scale API Management Platform SaaS, 2.x (On-Premises)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
