I know I can restrict template output to Admins only with :
{% if currentUser.admin ?? false %}
…and to any logged in user with:
{% if currentUser ?? false %}
And I’m aware of accessCp
as a permissions handle.
Can I use that, or similar, to restrict template output to any user group that is allowed to access the CP – without having to cycle through specific user groups in the template?
I tried:
{% if currentUser.accessCp ?? false %}
…but that doesn't work.
I'm using Craft 3.1.29.