diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-13 14:44:43 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-13 14:44:43 +0100 |
commit | 00970606d78486a8b6672659e9ea28521a102e44 (patch) | |
tree | 2b41f3344f9d894a75f87bda627eda911199722f /lib/gitlab/allowable.rb | |
parent | 24dd70d37834e55a7ead23ae14125e5e12f64d8b (diff) | |
download | gitlab-ce-00970606d78486a8b6672659e9ea28521a102e44.tar.gz |
Extract abilities checking module from ability model
Diffstat (limited to 'lib/gitlab/allowable.rb')
-rw-r--r-- | lib/gitlab/allowable.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/gitlab/allowable.rb b/lib/gitlab/allowable.rb new file mode 100644 index 00000000000..3cc218f9db4 --- /dev/null +++ b/lib/gitlab/allowable.rb @@ -0,0 +1,8 @@ +module Gitlab + module Allowable + def can?(user, action, subject) + Ability.allowed?(user, action, subject) + end + end +end + |