nickdr_workday
4 years agoContributor
Determining message role view access
We are currently working through building the indexing integration for external search and one of the challenges we are facing is extracting the right roles which have “read” permission for a message. Currently we can use the query API to return the roles associated with category the permission is set at. By getting the message ID we can determine the board and determine the roles associated with that board but there does not seem to be an endpoint that will tell me if what roles can view this item, example:
// Get the board ID for a message:
select id, topic, type, board.id from messages where id = "5"
select id, roles, messages from nodes where descendants.id = "board:nicks-board-1"
// Loop over all the parent roles that come back.
//Example role query returned from above
// Grab the roles for that category
SELECT id FROM roles where node.id = "category:nicks-category-1"
What I don't see anywhere in the docs (https://developer.khoros.com/khoroscommunitydevdocs/docs/roles) are where to check if the roles returned have what permissions.
Any help would be greatly appreciated.