summaryrefslogtreecommitdiff
path: root/app/models/ability.rb
diff options
context:
space:
mode:
authorAndrew8xx8 <avk@8xx8.ru>2013-03-25 02:17:03 +0400
committerAndrew8xx8 <avk@8xx8.ru>2013-03-25 02:17:03 +0400
commite90aebe259b1f81cb2523099cab4626b9276e751 (patch)
tree154f278a7619a15720a3df3f6c6c53081f0a63a7 /app/models/ability.rb
parent9bd1983e167c7a040565d8e03a20364455bddd59 (diff)
downloadgitlab-ce-e90aebe259b1f81cb2523099cab4626b9276e751.tar.gz
Personal snippets controlelr refactored
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r--app/models/ability.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb
index 928b36e6c80..2dadb584460 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -8,7 +8,7 @@ class Ability
when "Issue" then issue_abilities(user, subject)
when "Note" then note_abilities(user, subject)
when "ProjectSnippet" then project_snippet_abilities(user, subject)
- when "Snippet" then snippet_abilities(user, subject)
+ when "PersonalSnippet" then personal_snippet_abilities(user, subject)
when "MergeRequest" then merge_request_abilities(user, subject)
when "Group", "Namespace" then group_abilities(user, subject)
when "UserTeam" then user_team_abilities(user, subject)
@@ -135,8 +135,7 @@ class Ability
rules.flatten
end
-
- [:issue, :note, :project_snippet, :snippet, :merge_request].each do |name|
+ [:issue, :note, :project_snippet, :personal_snippet, :merge_request].each do |name|
define_method "#{name}_abilities" do |user, subject|
if subject.author == user
[