summaryrefslogtreecommitdiff
path: root/app/models/project.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-05-31 19:07:27 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-05-31 19:07:27 +0800
commitafc1fac03915f6e9df28fb3932093f73f01e3934 (patch)
treec1caac8fd996883c6fe06c40d715f5a7600c3981 /app/models/project.rb
parentb5e8de5c4c202d10ef8b48248b12f49c1330d04a (diff)
parent228926daee799c95e752a3c284c860e5bc60e528 (diff)
downloadgitlab-ce-afc1fac03915f6e9df28fb3932093f73f01e3934.tar.gz
Merge remote-tracking branch 'upstream/master' into 24196-protected-variables
* upstream/master: (89 commits) Revert "Merge branch 'grpc-1.3.4' into 'master'" Return nil when looking up config for unknown LDAP provider Avoid crash when trying to parse string with invalid UTF-8 sequence Enable Gitaly by default in GitLab 9.3 Don’t create comment on JIRA if link already exists Disable sub_group_issuables_spec.rb for mysql Fix math rendering on blob pages Add changelog Don't allow to pass a user to ProjectWiki#http_url_to_repo Revert "Merge branch '1937-https-clone-url-username' into 'master' " Fix bottom padding for build page Fix /unsubscribe slash command creating extra todos Fix omniauth-google-oauth2 dependencies in Gemfile.lock Update looks job log 'New issue'/'New merge request' dropdowns should show only projects with issues/merge requests feature enabled Fix spec for Members::AuthorizedDestroyService 31616-add-uptime-of-gitlab-instance-in-admin-area Set head pipeline when creating merge requests Create a separate helper to check if we show particular tab on a search page Add performance deltas between app deployments on Merge Request widget ...
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index a0314bf9e49..6892ff1e2d8 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -271,6 +271,7 @@ class Project < ActiveRecord::Base
scope :with_builds_enabled, -> { with_feature_enabled(:builds) }
scope :with_issues_enabled, -> { with_feature_enabled(:issues) }
+ scope :with_merge_requests_enabled, -> { with_feature_enabled(:merge_requests) }
enum auto_cancel_pending_pipelines: { disabled: 0, enabled: 1 }
@@ -873,10 +874,8 @@ class Project < ActiveRecord::Base
url_to_repo
end
- def http_url_to_repo(user = nil)
- credentials = Gitlab::UrlSanitizer.http_credentials_for_user(user)
-
- Gitlab::UrlSanitizer.new("#{web_url}.git", credentials: credentials).full_url
+ def http_url_to_repo
+ "#{web_url}.git"
end
def user_can_push_to_empty_repo?(user)