diff options
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) |