Created
November 27, 2019 02:00
-
-
Save svaustin66/950d3acd363aba24ce5a668a33291932 to your computer and use it in GitHub Desktop.
Only allow page access to Admins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if customer %} | |
{% if customer.tags contains 'admin' %} | |
<a name="pagecontent" id="pagecontent"></a> | |
<div class="sixteen columns page clearfix"> | |
<h1> | |
{{ page.title }} | |
</h1> | |
<div class="feature_divider"></div> | |
<div> | |
{% include 'page-multi-column', content: page.content %} | |
</div> | |
</div> | |
{% else %} | |
<div class="container"> | |
<div class="sixteen columns"> | |
<h1>{{ product.title }}</h1> | |
<div class="feature_divider"></div> | |
<p>Access denied</p> | |
</div> | |
</div> | |
{% endif %} | |
{% else %} | |
<div class="container"> | |
<div class="sixteen columns"> | |
<h1>{{ product.title }}</h1> | |
<div class="feature_divider"></div> | |
<p>You must must be logged in to access this page. <a href="/account/login">Please login here</a>.</p> | |
</div> | |
</div> | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment