summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-12-08 14:51:38 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-12-08 15:21:34 +0100
commitc1db5b91207f4e3f7144c5cb62ce9160cf2e32e9 (patch)
treef07d53e02164ed1bc828eba11e551ae4ca01448c /app
parent7d88399454b5c71c9af84561c858001d1a733c41 (diff)
downloadgitlab-ce-c1db5b91207f4e3f7144c5cb62ce9160cf2e32e9.tar.gz
Fix some detailed statuses specs related to abilities
Diffstat (limited to 'app')
-rw-r--r--app/models/ability.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb
index fa8f8bc3a5f..ce461caf686 100644
--- a/app/models/ability.rb
+++ b/app/models/ability.rb
@@ -1,4 +1,10 @@
class Ability
+ module Allowable
+ def can?(user, action, subject)
+ Ability.allowed?(user, action, subject)
+ end
+ end
+
class << self
# Given a list of users and a project this method returns the users that can
# read the given project.