Simple coding question: Hiding pages for two types of tagged customers

Hi all!

I have some pages on my website that are only accessible for customers with the tag ‘customer1’. I used the following code in my theme.liquid to accomplish this:

{% if template contains ‘secret’ %}
{% if customer %}
{% if customer.tags contains ‘customer1’ %}
{{ content_for_layout }}
{% else %}
{% include ‘access-denied-page’ %}
{% endif %}
{% else %}
{% include ‘access-denied-page’ %}
{% endif %}
{% else%}
{{ content_for_layout }}
{% endif %}

I have now added some additional pages that I would like to make exclusively available for yet another set of tagged customers. I have added the word ‘hidden’ to the page-handles and I would like these pages only to be accessible for customers with the tag ‘customer2’.

Can anyone help me out on adjusting the code above so that this is accomplished?

Thank you so much in advance for your kind help!

Regards, Manita