diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-08-12 17:23:19 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-08-12 17:23:19 -0500 |
commit | c770201061c5d39e6e297951badfafc8ddf14906 (patch) | |
tree | 72da00c88358d605f33c983945dd7e1565956c47 /app/models/ability.rb | |
parent | 9d9b7212bc5fe04e64a0a034a412f5d92cc96151 (diff) | |
parent | 11eefba891f214eefc1efa334adbcc9e979c0ce3 (diff) | |
download | gitlab-ce-c770201061c5d39e6e297951badfafc8ddf14906.tar.gz |
Merge branch 'master' into diff-line-comment-vuejs
Diffstat (limited to 'app/models/ability.rb')
-rw-r--r-- | app/models/ability.rb | 4 |
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) |