Hi,
if you mean the Roles that have any permission over a particular node, then we are talking about ACLs.
In the UI, this is processed by the Security control ~\CMSModules\Content\Controls\Security.ascx.cs, you can find some inspiration here for general processing of the node permissions.
You would need to use methods from
AclProvider class to get all permissions for given node and process them, or you could use more specific methods, e.g. method
GetAllowedRoles. Please check the API reference for more details.
I would also recommend to check the
Document permissions API internals (with examples) in the DevGuide
However, if your concern is just to check permission, you can simply work with the current User:
CMSContext.CurrentUser.IsAuthorizedPerTreeNode(NodeID, permission);maybe together with
IsInRole method... but it depends on your exact aim.
Regards,
Zdenek