diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-03-09 15:38:07 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-03-09 17:10:43 +0100 |
commit | 53719ecb80b757a2096e55cd3da995ac9db8d3b8 (patch) | |
tree | ea587bb790f42bab84ecf007f947e4cf72a52b82 /app/models/ability.rb | |
parent | 96d35c5975fe8c5ff0a6306b8da5a623cfcb47b6 (diff) | |
download | gitlab-ce-fix-git-push-service-specs.tar.gz |
Handle permissions for ExternalIssue instancesfix-git-push-service-specs
This fixes the remainder of the GitPushService specs.
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r-- | app/models/ability.rb | 5 |
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) |