Authorize Git LFS HTTP requests

According to [1] Git LFS client uses HTTP Basic Auth to authorize
requests. Change adds logic to verify that the user has permission to
perform requested operation.

Notes:
1. in order to authorize requests
  auth.gitBasicAuth = true
needs to be set in gerrit.config.
2. SSH Auth gets broken with this change. It will be fixed in the follow
up change.

[1]
https://github.com/git-lfs/git-lfs/blob/master/docs/api/authentication.md

Change-Id: I28864fdaaf701e06fa9f60e7e913bc4a15da7b1d
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>
5 files changed
tree: 2d485c1cd8655bece119bc10dd08a14cc932de56
  1. lib/
  2. src/
  3. .buckconfig
  4. .gitignore
  5. BUCK