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

Function createSubject

src/common/authorization.cpp:65–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63
64
65const Option<Subject> createSubject(const Option<Principal>& principal)
66{
67 if (principal.isSome()) {
68 Subject subject;
69
70 if (principal->value.isSome()) {
71 subject.set_value(principal->value.get());
72 }
73
74 foreachpair (const string& key, const string& value, principal->claims) {
75 Label* claim = subject.mutable_claims()->mutable_labels()->Add();
76 claim->set_key(key);
77 claim->set_value(value);
78 }
79
80 return subject;
81 }
82
83 return None();
84}
85
86
87Future<bool> authorizeLogAccess(

Callers 14

flagsMethod · 0.85
createMethod · 0.85
authorizeEndpointFunction · 0.85
authorizeLogAccessFunction · 0.85
_flagsMethod · 0.85
_teardownMethod · 0.85
authorizeMethod · 0.85
authorizeGetWeightMethod · 0.85
authorizeGetQuotaMethod · 0.85
authorizeUpdateQuotaMethod · 0.85

Calls 3

NoneClass · 0.85
isSomeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected