Role based access control C++ library or example
题
I am writing an application and I want to restrict access to certain behaviours/actions based on a users role.
I have searched online for a C++ library that implements this - or at least a guideline on how to "roll my own" - to no avail. Is anyone aware of such a library?. If no, I would be grateful for some ideas on how best to implement such a library/framework.
解决方案
Roles can be implemented as simple boolean (or binary) flags. Just check if the user has the flag set before performing some action.
不隶属于 StackOverflow