Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
46f82ccf
Commit
46f82ccf
authored
Jun 13, 2011
by
Michal 'vorner' Vaner
Browse files
[trac997] The ACL class implementation
parent
d324bf65
Changes
1
Show whitespace changes
Inline
Side-by-side
src/lib/acl/acl.h
View file @
46f82ccf
...
...
@@ -96,7 +96,13 @@ public:
* passed to the checks.
*/
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.
...
...
@@ -109,7 +115,7 @@ public:
* \param action The action to return when the thing matches this check.
*/
void
append
(
CheckPtr
check
,
const
Action
&
action
)
{
entries_
.
push_back
(
Entry
(
check
,
action
));
}
private:
// Just type abbreviations.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment