Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-08-13 01:23:19 +0300
committerDouwe Maan <douwe@selenight.nl>2016-08-13 01:23:19 +0300
commitc770201061c5d39e6e297951badfafc8ddf14906 (patch)
tree72da00c88358d605f33c983945dd7e1565956c47 /app/models/ability.rb
parent9d9b7212bc5fe04e64a0a034a412f5d92cc96151 (diff)
parent11eefba891f214eefc1efa334adbcc9e979c0ce3 (diff)
Merge branch 'master' into diff-line-comment-vuejs
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r--app/models/ability.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb
index c9d4c4dd03b..ce5d7ce0dad 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -6,6 +6,10 @@ class Ability
return [] unless user.is_a?(User)
return [] if user.blocked?
+ abilities_by_subject_class(user: user, subject: subject)
+ end
+
+ def abilities_by_subject_class(user:, subject:)
case subject
when CommitStatus then commit_status_abilities(user, subject)
when Project then project_abilities(user, subject)