summaryrefslogtreecommitdiff
path: root/app/models/ability.rb
diff options
context:
space:
mode:
authorAndrew8xx8 <avk@8xx8.ru>2013-03-24 22:31:14 +0400
committerAndrew8xx8 <avk@8xx8.ru>2013-03-24 22:31:14 +0400
commit5b35000f16201bd631f161ef6d79b0a77dc2c27b (patch)
tree903e41d676c1939bae2cb8d6232c7fc9380bbff5 /app/models/ability.rb
parentbc7c5f87bbd5cc25a0aaf03e9e5ecf6a65375098 (diff)
downloadgitlab-ce-5b35000f16201bd631f161ef6d79b0a77dc2c27b.tar.gz
Snippets feature refactored. Tests now use spinach
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r--app/models/ability.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb
index 41f7127403c..928b36e6c80 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -7,6 +7,7 @@ class Ability
when "Project" then project_abilities(user, subject)
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 "MergeRequest" then merge_request_abilities(user, subject)
when "Group", "Namespace" then group_abilities(user, subject)
@@ -135,7 +136,7 @@ class Ability
end
- [:issue, :note, :snippet, :merge_request].each do |name|
+ [:issue, :note, :project_snippet, :snippet, :merge_request].each do |name|
define_method "#{name}_abilities" do |user, subject|
if subject.author == user
[