Have a URL only visible to a specific role
This works just fine.
<#if user_has_role?? && (user_has_role == "admin" || user_has_role == "partner" || user_has_role =="customer") >
<li><a href="">Manage</a></li>
<li><a href="">Cases</a></li>
<li><a href="">Knowledge</span></a></li>
<li><a class="first" href="#">Community</a></li>
The code below, I'm having problem getting it to work properly. The link appears for Partner and Customer but I only want it to appears for the Partner role. When I removed the Customer role, it doesn't display for Partner or Customer but when I add the Customer role back, it works but it appears for both roles.
<#if user_has_role?? && (user_has_role == "admin" || user_has_role == "partner" || user_has_role =="customer") >
<li><a class="second" href="#">Partner Portal</a></li>
</#if>
This is my code:
<ul>
<#if user_has_role?? && (user_has_role == "admin" || user_has_role == "partner" || user_has_role =="customer") >
<li><a href="">Manage</a></li>
<li><a href="">Cases</a></li>
<li><a href="">Knowledge</span></a></li>
<li><a class="first" href="#">Community</a></li>
<#if user_has_role?? && (user_has_role == "admin" || user_has_role == "partner" || user_has_role =="customer") >
<li><a class="second" href="#">Partner Portal</a></li>
</#if>
<#else>
<li><a href="http://support.purestorage.com/">Knowledge</span></a></li>
<li><a class="first" href="#">Community</a></li>
</#if>
<#if user.registered>
<#if config.getString("phase", "stage") == "stage">
<li class="last"><a onclick="logoff();" href="#">Log Out</a></li>
<#else>
<li class="last"><a onclick="logoff();" href="#">Log Out</a></li>
</#if>
<#else>
<#if config.getString("phase", "stage") == "stage">
<li class="last"><a href="">Sign In</a></li>
<li class="last"><a href="">Register</a></li>
<#else>
<li class="last"><a href="">Sign In</a></li>
<li class="last"><a href="">Register</a></li>
</#if>
</#if>
</ul>
Any help would be greatly appreciated.
Thanks!