You might want to provide some more specific info (examples may help) so community members can give you more targeted assistance. e.g. which SAS version and platform is this for? Are you looking for help with access controls or just SAS roles and capabilities? It sounds like it might be a combination of several things. By role do you mean a SAS "Role" or a generic job role?
As @SASKiwi mentioned SAS metadata bound libraries may help here. You will probably also need to look at access controls in metadata (via ACTs/ACEs for groups on objects), access controls in the file system (UNIX, Linux or WIndows?) and role/capabilities in metadata (to control access to SAS application features) - a multi-layered approach.
If your question is only about SAS roles and capabilities then I would suggest the following resources: