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

Function authorizeLogAccess

src/common/authorization.cpp:87–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

85
86
87Future<bool> authorizeLogAccess(
88 const Option<Authorizer*>& authorizer,
89 const Option<Principal>& principal)
90{
91 if (authorizer.isNone()) {
92 return true;
93 }
94
95 Request request;
96 request.set_action(ACCESS_MESOS_LOG);
97
98 Option<Subject> subject = createSubject(principal);
99 if (subject.isSome()) {
100 request.mutable_subject()->CopyFrom(subject.get());
101 }
102
103 return authorizer.get()->authorized(request);
104}
105
106
107const AuthorizationCallbacks createAuthorizationCallbacks(

Callers 2

initializeMethod · 0.85
initializeMethod · 0.85

Calls 6

createSubjectFunction · 0.85
CopyFromMethod · 0.80
isNoneMethod · 0.45
isSomeMethod · 0.45
getMethod · 0.45
authorizedMethod · 0.45

Tested by

no test coverage detected