----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/47274/#review133513 -----------------------------------------------------------
Fix it, then Ship it! I'll take care of the outstanding issues and commit this for you shortly. I've also manually tested that authz with local authorizer works. src/master/http.cpp (lines 1273 - 1275) <https://reviews.apache.org/r/47274/#comment197973> Reformat this so it looks similar to previous lines. src/master/master.hpp (lines 1010 - 1012) <https://reviews.apache.org/r/47274/#comment197974> Move this above other `authorize*()` functions for consistency. src/master/master.hpp (lines 1021 - 1024) <https://reviews.apache.org/r/47274/#comment197975> Move this before `_set()`. src/master/quota_handler.cpp (lines 428 - 429) <https://reviews.apache.org/r/47274/#comment197977> We backtick each type or variable name. // Quotas can be updated during preparation of the response. // Copy current view of the collection to avoid conflicts. src/master/quota_handler.cpp (line 438) <https://reviews.apache.org/r/47274/#comment197978> Latest news: there will be filtering instead of batch request. // TODO(alexr): Use an authorization filter here once they are available. src/master/quota_handler.cpp (lines 444 - 449) <https://reviews.apache.org/r/47274/#comment197983> ``` return process::collect(authorizedRoles) .then(defer( master->self(), [=](const list<bool> authorizedRolesCollected) -> Future<http::Response> { return _status(request, quotaInfos, authorizedRolesCollected); })); ``` for consistency with the rest of the codebase. src/master/quota_handler.cpp (line 446) <https://reviews.apache.org/r/47274/#comment197984> const & ? src/master/quota_handler.cpp (line 464) <https://reviews.apache.org/r/47274/#comment197985> // NOTE: This error-prone code will be removed with introduction of authorization filters. src/master/quota_handler.cpp (lines 502 - 525) <https://reviews.apache.org/r/47274/#comment197987> Move it before `authorizeSetQuota()`. - Alexander Rukletsov On May 17, 2016, 5:06 a.m., Zhitao Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/47274/ > ----------------------------------------------------------- > > (Updated May 17, 2016, 5:06 a.m.) > > > Review request for mesos, Adam B and Alexander Rukletsov. > > > Bugs: MESOS-5336 > https://issues.apache.org/jira/browse/MESOS-5336 > > > Repository: mesos > > > Description > ------- > > Authorize what quota can be seen by GET_QUOTA_BY_ROLE. > > > Diffs > ----- > > docs/endpoints/master/quota.md 83913fac9d45ef25629222f572529493d0c66f05 > include/mesos/authorizer/acls.proto > 9adae8c2a2e1b2ee4b9068ea50fcebb0544f2e5d > include/mesos/authorizer/authorizer.proto > 32492a59ad95df3bb673ec42321518f86c11af59 > src/authorizer/local/authorizer.cpp > e95435327bb3b6f447e814b8657bce8084535346 > src/master/http.cpp a0d67671c89b9794e721dc3ba012acd3bdc447e3 > src/master/master.hpp 3e55114ee7866e06513071e86e15608099dae052 > src/master/quota_handler.cpp 6590519d8440f352f5bf00fda805414a5aad725c > src/tests/master_quota_tests.cpp 9ce7e2e481706c74f080d54b6f58d57874a27e64 > > Diff: https://reviews.apache.org/r/47274/diff/ > > > Testing > ------- > > Unit test. > > > Thanks, > > Zhitao Li > >
