diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-23 15:08:38 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-23 15:08:38 +0300 |
commit | 5ad0cf26551baff8f08af8562a8d45e6ec14d71a (patch) | |
tree | 57f1a6bad31bcd11efacd3fdfb9cc92f88fb6a86 /app/models/snippet.rb | |
parent | f47c768fad17d4c876e96524f83f8306f071db66 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/snippet.rb')
-rw-r--r-- | app/models/snippet.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/models/snippet.rb b/app/models/snippet.rb index b7f396681af..19685cdb78e 100644 --- a/app/models/snippet.rb +++ b/app/models/snippet.rb @@ -215,9 +215,7 @@ class Snippet < ApplicationRecord end def embeddable? - ability = project_id? ? :read_project_snippet : :read_personal_snippet - - Ability.allowed?(nil, ability, self) + Ability.allowed?(nil, :read_snippet, self) end def notes_with_associations @@ -240,7 +238,7 @@ class Snippet < ApplicationRecord end def to_ability_name - model_name.singular + 'snippet' end def valid_secret_token?(token) |