Skip to content

Commit fcc3839

Browse files
committed
Fix Command paths used for Authorisation
Re ECFLOW-1960
1 parent e012533 commit fcc3839

File tree

8 files changed

+293
-126
lines changed

8 files changed

+293
-126
lines changed

libs/base/src/ecflow/base/Algorithms.hpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ template <typename PREDICATE>
8181
void visit(const Defs& defs, const Path& path, PREDICATE& predicate) {
8282

8383
// a. Visit the 'definitions' (which includes the server state)
84-
predicate(defs);
84+
predicate.handle(defs);
8585

8686
if (path.empty()) {
8787
return;
@@ -97,7 +97,12 @@ void visit(const Defs& defs, const Path& path, PREDICATE& predicate) {
9797
else {
9898
current = current->find_immediate_child(token);
9999
}
100-
predicate(*current);
100+
if (current == nullptr) {
101+
predicate.not_found();
102+
return;
103+
}
104+
105+
predicate.handle(*current);
101106
}
102107

103108
}

0 commit comments

Comments
 (0)