Forum Discussion

justageek's avatar
justageek
Helper
11 years ago

Get permissions for every role / category combination

I know how to get all categories for our community, and I can loop through the roles for each category.  What I really need to do to finish my current process is to also query and get the configured permissions for the category / role combination.  Thus far, I have not found any way to do this.  Is this possible at all?

  • DougS's avatar
    DougS
    Khoros Oracle

    Unfortunately right now there is no way to do this, as Lithium does not expose a way to get permissions via the API.  

     

    The only permission-checking Lithium has exposed is the hasPermission check in the CoreNode freemarker context object -- that checks if the current caller has the permission passed in inside of the current node (the board/category/community the page they are on is associated with) and you have to know the permission you want to check.

     

    There is a (somewhat crude) way to find different permission keys on the permissions admin page.

     

    -Doug