code: func withGitMiddleware(c *router.Context, next router.Handler) {
  	acls, err := gitacls.FromConfig(c.Context, common.GetSettings(c.Context).SourceAcls)
  	if err != nil {
  		ErrorHandler(c, err)
  		return
  	}
  	c.Context = git.UseACLs(c.Context, acls)
  	next(c)
  }
docs: // withGitMiddleware is a middleware that installs a prod Gerrit and Gitiles client
  // factory into the context. Both use Milo's credentials if current user is
  // has been granted read access in settings.cfg.
  //
  // This middleware must be installed after the auth middleware.