Sorry Folks, I need to spend more time in here.
You could also do this using GraphQL Queries:
query MyQuery {
permissionsForCoreNode(id: "board:example") {
... on ForumPermissions {
__typename
readContent {
access
inheritedAccess {
access
}
}
readForum {
access
inheritedAccess {
access
}
}
updateFeaturedWidget {
access
inheritedAccess {
access
}
}
}
}
}
In this example we are querying the permissions set on the core node "board:example", specifically this is a forum board. To demonstraight this graphQL call I have used 3 different permissions they are:
Forum >> Read Content
Forum >> Read Forum
Forum >> updateFeatureWidget
Why this last one? I want to demonstrate that this is pulling the default permissions for the node not the user context permissions, this will be demonstrated by the fact i am using an Administrator API role to pull this information and the administrator has this last permission set to assign.
When I run this graphQL i get this response:
{
"data": {
"permissionsForCoreNode": {
"__typename": "ForumPermissions",
"readContent": {
"access": "INHERITED",
"inheritedAccess": {
"access": "GRANTED"
}
},
"readForum": {
"access": "INHERITED",
"inheritedAccess": {
"access": "GRANTED"
}
},
"updateFeaturedWidget": {
"access": "INHERITED",
"inheritedAccess": {
"access": "DENIED"
}
}
}
}
}
this tells you that the permission at this node is inherited as 'GRANTED'
This graphQL is actually very very powerful, not only can it tell you what the default role is at this node but also where it was inherited from.
I am not sure though, you may need to make this call using a graphQLAdmin call (I haven't tested that part) and if you do then you will need to put it in an Endpoint to prevent malicious users intercepting it and manipulating the call.