Commit 46f82ccf authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[trac997] The ACL class implementation

parent d324bf65
...@@ -96,7 +96,13 @@ public: ...@@ -96,7 +96,13 @@ public:
* passed to the checks. * passed to the checks.
*/ */
Action execute(const Context& context) const { Action execute(const Context& context) const {
// TODO a for cycle for (typename Entries::const_iterator i(entries_.begin());
i != entries_.end(); ++ i) {
if (i->first->matches(context)) {
return (i->second);
}
}
return (policy_);
} }
/** /**
* \brief Add new entry at the end of the list. * \brief Add new entry at the end of the list.
...@@ -109,7 +115,7 @@ public: ...@@ -109,7 +115,7 @@ public:
* \param action The action to return when the thing matches this check. * \param action The action to return when the thing matches this check.
*/ */
void append(CheckPtr check, const Action& action) { void append(CheckPtr check, const Action& action) {
entries_.push_back(Entry(check, action));
} }
private: private:
// Just type abbreviations. // Just type abbreviations.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment