MCPcopy Create free account
hub / github.com/apache/mesos / approved

Method approved

src/common/http.hpp:374–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372 std::initializer_list<authorization::Action> actions);
373
374 Try<bool> approved(
375 authorization::Action action,
376 const ObjectApprover::Object& object) const
377 {
378 if (!approvers.contains(action)) {
379 LOG(WARNING)
380 << "Attempted to authorize principal "
381 << " '" << (principal.isSome() ? stringify(*principal) : "") << "'"
382 << " for unexpected action " << authorization::Action_Name(action);
383
384 return false;
385 }
386
387 return approvers.at(action)->approved(object);
388 }
389
390 // Constructs one (or more) authorization objects, depending on the
391 // action, and returns true if all action-object pairs are authorized.

Callers

nothing calls this directly

Calls 8

atMethod · 0.80
errorMethod · 0.65
stringifyFunction · 0.50
ObjectClass · 0.50
containsMethod · 0.45
isSomeMethod · 0.45
isErrorMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected