Forum Discussion

SophiaCiocca1's avatar
SophiaCiocca1
Contributor
8 years ago

Role management in custom components

Hi Can anyone help me with role management in custom components. I would like to know the code which i need to add in the component  to make a component not viewable for certain users ?   Thanks in...
  • Gagandeeps's avatar
    8 years ago

    Let me just simplify things for you 

     

    <#if coreNode.permissions.hasPermission("update_community")>

      <!-- Content goes here -->

    </#if>

    Hope this helps to you ... :)

     

    NOTE :- That ties the logic to permissions as opposed to roles