mirror of
https://github.com/jorenchik/testing-spring-2024.git
synced 2025-10-21 20:10:36 +00:00
feat: action belongs to role check
This commit is contained in:
parent
ce9e6be7e7
commit
10c486e996
@ -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<Event> *relevantEvents) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user