Forum Discussion

sunny_mody's avatar
sunny_mody
Advisor
11 years ago

How to check whether user has create post permission using RESTAPI

Hi,

 

Is there an REST API to check if a user has permission granted to create/edit a post ?

 

Thanks,

Sunny

1 Reply

  • SuzieH's avatar
    SuzieH
    Khoros Alumni (Retired)
    11 years ago

    Through the traditional calls I believe you would need to know which role(s) the permission belonged to, and then check to see if the user has one of those roles. 

     

    In a custom component, you can check to see if the user has a particular permission via the coreNode.permissions.hasPermission FreeMarker context object. You'll find the permission identifier to pass in the PDF attached the Permission descriptions article.