diff options
| author | Sean McGivern <sean@mcgivern.me.uk> | 2017-03-21 10:39:57 +0000 |
|---|---|---|
| committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-03-21 10:39:57 +0000 |
| commit | 4146be04482f27bc10246dd471c3f08ec258e0ed (patch) | |
| tree | 46888bb77e8a34608a9cb1a9fe015671e9efbe8f /lib | |
| parent | 2f0a2e99f18838e53f9a7946aaaf656e11c2ef4f (diff) | |
| parent | be25bbc4d2c7e3d5cf3da6f51cb7f7355295ef52 (diff) | |
| download | gitlab-ce-4146be04482f27bc10246dd471c3f08ec258e0ed.tar.gz | |
Merge branch '29685-wrong-number-of-arguments-calling-http_url_to_repo-on-cloning-project-wikis' into 'master'
Fix ProjectWiki#http_url_to_repo signature
Closes #29685
See merge request !10079
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gitlab/url_sanitizer.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/url_sanitizer.rb b/lib/gitlab/url_sanitizer.rb index c81dc7e30d0..9ce13feb79a 100644 --- a/lib/gitlab/url_sanitizer.rb +++ b/lib/gitlab/url_sanitizer.rb @@ -18,6 +18,12 @@ module Gitlab false end + def self.http_credentials_for_user(user) + return {} unless user.respond_to?(:username) + + { user: user.username } + end + def initialize(url, credentials: nil) @url = Addressable::URI.parse(url.strip) @credentials = credentials |
