When used with a Hash, `.keys.include?` is bad because:
1. It performs a O(n) search instead of the efficient `.has_key?`
2. It clones all keys into separate array.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/64975
[master] Resolve "Personal access token with only `read_user` scope can be used to authenticate any web request"
See merge request gitlab/gitlabhq!2583