> On Sept. 19, 2017, 10:38 p.m., Gastón Kleiman wrote:
> > src/slave/http.cpp
> > Lines 869-872 (original), 860-864 (patched)
> > <https://reviews.apache.org/r/61925/diff/2/?file=1815901#file1815901line869>
> >
> > I'd do:
> >
> > ```
> > if (acceptor->accept()) {
> > return OK(_flags(), request.url.query.get("jsonp"));
> > }
> >
> > return Forbidden();
> > ```
> >
> > Ditto in the rest of the file.
In this case, I think I actually prefer the existing style. This matches a
pattern we often see in the codebase, something like:
```
if (something_bad) {
return Error();
}
return successfulThing;
```
I'd prefer to leave these as-is. Feel free to re-open the issue if you like.
- Greg
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/61925/#review185728
-----------------------------------------------------------
On Sept. 21, 2017, 4:52 p.m., Greg Mann wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/61925/
> -----------------------------------------------------------
>
> (Updated Sept. 21, 2017, 4:52 p.m.)
>
>
> Review request for mesos, Anand Mazumdar, Alexander Rojas, and Gastón Kleiman.
>
>
> Bugs: MESOS-7914
> https://issues.apache.org/jira/browse/MESOS-7914
>
>
> Repository: mesos
>
>
> Description
> -------
>
> This patch updates the agent endpoint handlers to make use of
> the `AuthorizationAcceptor` exclusively for authorization,
> eliminating the need to explicitly create authorization
> subjects and objects.
>
> Endpoint-related slave authorization tests are also updated to
> accommodate this change.
>
>
> Diffs
> -----
>
> src/slave/http.hpp 44a95dec4c9b8bb65d712c5538bbd7afffe2cf7b
> src/slave/http.cpp 3ea7829df8c1c35d2fa3a44f19a60b7e261042ce
> src/tests/slave_authorization_tests.cpp
> 4c7d37fd14c8f3e7a52d35fb685fb8f05cba1e70
>
>
> Diff: https://reviews.apache.org/r/61925/diff/3/
>
>
> Testing
> -------
>
> `make check`
>
>
> Thanks,
>
> Greg Mann
>
>