I have created a template using below language and I found this is not working:
{% if user.role_keys contains 'admin' %}
user is admin.
{% else %}
user is not admin.
{% endif %}
it doesn't recognize my admin account.
Then I tried another way to write it as
{% assign is_admin = user | role: 'admin' %}
{% if is_admin %}...
and I found it assigns every user to true value which makes it not working.
Could anyone let me know which part is going wrong?
Also, I don't find this liquid language factors documented anywhere in MS official which is very dissapointing. If anyone has any reference it will be very appreciated.
Thank you very much!
*This post is locked for comments