summaryrefslogtreecommitdiff
path: root/app/models/ability.rb
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2016-03-10 09:45:38 +0100
committerJacob Vosmaer <contact@jacobvosmaer.nl>2016-03-10 09:45:38 +0100
commit570f428b89fad526e6f7c9c4afd16a8ced83369a (patch)
tree1fa3f4acced8b921c4105fde193128ecce3fc733 /app/models/ability.rb
parent3eb7ea49feaf9341b2eec6eb0c58ae2f0aa37864 (diff)
parent491ac7ce4b79c901e23799d2062f9f013f08c6c3 (diff)
downloadgitlab-ce-redis-config-parser.tar.gz
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into redis-config-parserredis-config-parser
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r--app/models/ability.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb
index f34554d557c..fe9e0aab717 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -9,6 +9,7 @@ class Ability
when CommitStatus then commit_status_abilities(user, subject)
when Project then project_abilities(user, subject)
when Issue then issue_abilities(user, subject)
+ when ExternalIssue then external_issue_abilities(user, subject)
when Note then note_abilities(user, subject)
when ProjectSnippet then project_snippet_abilities(user, subject)
when PersonalSnippet then personal_snippet_abilities(user, subject)
@@ -424,6 +425,10 @@ class Ability
end
end
+ def external_issue_abilities(user, subject)
+ project_abilities(user, subject.project)
+ end
+
private
def named_abilities(name)