summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-05-10 18:26:02 +0000
committerRobert Speicher <robert@gitlab.com>2017-05-10 18:26:02 +0000
commit180ec7113e358a7f8388e1436dc0670a11ba68df (patch)
treefba74833a7e89d6c19160a0d7e02355c5215c8df /app/models
parent09c4d27ae48ceb181f86657043af2a129c17dabf (diff)
parentebd8b7f60f41358df562625a4692f352b86b8c80 (diff)
downloadgitlab-ce-180ec7113e358a7f8388e1436dc0670a11ba68df.tar.gz
Merge branch 'bvl-security-patches' into 'master'
Security patches -> `master` See merge request !11230
Diffstat (limited to 'app/models')
-rw-r--r--app/models/snippet.rb13
1 files changed, 0 insertions, 13 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb
index abfbefdf9a0..882e2fa0594 100644
--- a/app/models/snippet.rb
+++ b/app/models/snippet.rb
@@ -152,18 +152,5 @@ class Snippet < ActiveRecord::Base
where(table[:content].matches(pattern))
end
-
- def accessible_to(user)
- return are_public unless user.present?
- return all if user.admin?
-
- where(
- 'visibility_level IN (:visibility_levels)
- OR author_id = :author_id
- OR project_id IN (:project_ids)',
- visibility_levels: [Snippet::PUBLIC, Snippet::INTERNAL],
- author_id: user.id,
- project_ids: user.authorized_projects.select(:id))
- end
end
end