diff --git a/src/lib.cpp b/src/lib.cpp index 0a8ad8a..4b3576e 100644 --- a/src/lib.cpp +++ b/src/lib.cpp @@ -53,9 +53,7 @@ int validateAction( } bool actionBelongsToRole(Role *role, Action *action) { - // TODO: implement - bool belongs = false; - return belongs; + return std::find(role->actions.begin(), role->actions.end(), *action) != role->actions.end(); } bool isActionAllowed(Action *action, std::vector *relevantEvents) {