| 85 | |
| 86 | |
| 87 | Future<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 | |
| 107 | const AuthorizationCallbacks createAuthorizationCallbacks( |
no test coverage detected