diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-19 09:09:27 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-19 09:09:27 +0000 |
commit | 2af90cef2e2e9c776eae4394a43dba3be7f33d1e (patch) | |
tree | bb4bc691caa6cc74b45720ecd779517f9c8c2cd3 /app/presenters/snippet_presenter.rb | |
parent | cf58004721ee715dd3884476f6fa0c62a7e7f247 (diff) | |
download | gitlab-ce-2af90cef2e2e9c776eae4394a43dba3be7f33d1e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/presenters/snippet_presenter.rb')
-rw-r--r-- | app/presenters/snippet_presenter.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/presenters/snippet_presenter.rb b/app/presenters/snippet_presenter.rb index ba9d566932a..ba0b2b42383 100644 --- a/app/presenters/snippet_presenter.rb +++ b/app/presenters/snippet_presenter.rb @@ -11,6 +11,14 @@ class SnippetPresenter < Gitlab::View::Presenter::Delegated Gitlab::UrlBuilder.build(snippet, raw: true) end + def ssh_url_to_repo + snippet.ssh_url_to_repo if snippet.versioned_enabled_for?(current_user) + end + + def http_url_to_repo + snippet.http_url_to_repo if snippet.versioned_enabled_for?(current_user) + end + def can_read_snippet? can_access_resource?("read") end |