Forum Discussion

skylinegtr's avatar
10 years ago

Link and page access to Employee only

Is there a way to make the following link to be visible to employees only? See image below.     I've created a custom page but I cannot make it accessible to employees only. Not sure what I'm ...
  • VarunGrazitti's avatar
    VarunGrazitti
    10 years ago

    skylinegtr - Here you go

     

    <ul>
    <li><a href="index.html">Knowledge & Support</a></li>
    <li><a href="index.html">Blogs</a></li>
    <li><a href="index.html">Forums</a></li>
    <li><a href="index.html">Idea Exchange</a></li>
    <li><a href="index.html">Events</a></li>
    <#if user.registered >
    <#assign show_module = false />
    <#list restadmin("/users/id/${user.id?c}/roles").roles.role as role>
    <#if role.name?? && (role.name == "Employee") || (role.name == "SECOND_ROLE")>
    <#assign show_module = true />
    </#if>
    </#list>
    <#if show_module>
    <li><a href="contact.html">Puritans</a></li>
    </#if>
    </#if>
    </ul>