diff options
author | Mark Chao <mchao@gitlab.com> | 2018-12-11 14:28:06 +0800 |
---|---|---|
committer | Mark Chao <mchao@gitlab.com> | 2018-12-20 14:32:51 +0800 |
commit | 30c6db8f0354847c275335c120d7218c0098c41f (patch) | |
tree | 921d83eea0ca710a95b028775557816cbc341e57 /app/helpers/snippets_helper.rb | |
parent | 00096b52ced2962d237540c494f2ad6c3add70ef (diff) | |
download | gitlab-ce-30c6db8f0354847c275335c120d7218c0098c41f.tar.gz |
Move embeddable? to model to be used outside view
Diffstat (limited to 'app/helpers/snippets_helper.rb')
-rw-r--r-- | app/helpers/snippets_helper.rb | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/app/helpers/snippets_helper.rb b/app/helpers/snippets_helper.rb index c7d31f3469d..a20c47ed91a 100644 --- a/app/helpers/snippets_helper.rb +++ b/app/helpers/snippets_helper.rb @@ -130,12 +130,4 @@ module SnippetsHelper link_to external_snippet_icon('download'), download_url, class: 'btn', target: '_blank', title: 'Download', rel: 'noopener noreferrer' end - - def public_snippet? - if @snippet.project_id? - can?(nil, :read_project_snippet, @snippet) - else - can?(nil, :read_personal_snippet, @snippet) - end - end end |