Forum Discussion

sunny_mody's avatar
sunny_mody
Advisor
11 years ago

Check for a permission using custom objects

Hi, I want to check whether a user has the permission to escalate the post or not on ForumTopicPage using context object like ${coreNode.permissions.hasPermission("can_update_community")}   But I a...
  • VarunGrazitti's avatar
    11 years ago

    Hi sunny_mody - You have to use following:

     

    <#if coreNode.permissions.hasPermission("update_community")>
      <!-- Content goes here -->
    </#if>

     

    It is update_community instead of can_update_community.

     

    I hope this helps.