summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
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.