[DISCUSS] Remove duplicate authorisation check#1246
Conversation
|
This looks fine to me. The only issue I see is that if someone wants to use a custom request authorization module they now have the burden of ensuring that fabric:get_security/2 is called. Although using a non-default authorization module means you're already in non-default behavior, and allowing for all authorization to happen in that configurable model actually seems more right than "Do all your own authorization! Except not really you also have to have this hard coded authorization check as well!" |
|
I'm kind of -0.5 to this, at least without someone taking a very close look at this. The removed check That said, the duplication of |
|
@chewbranca good feedback, thanks.
|
|
While working on #1245 I noticed
fabric:get_security()is being called twice for each database request.I tracked it down to
chttpd_auth_request:do_authorization_check()andchttpd:do_db_request().Removing the second one passes the test suite fine. I’d like a thorough review of this, because we might not be testing an invariant that this provides for good reason.