summaryrefslogtreecommitdiff
path: root/lib/gitlab/allowable.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-12-14 15:18:46 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-12-14 15:18:46 +0000
commit4bdfb0391a578847fde5589eb44ac6737c9e4b64 (patch)
tree4af12a6ef4f7ead85c2d80a48687f42c492564fa /lib/gitlab/allowable.rb
parent161d7c02d4ff49d6d91b982faee61b5de00d2631 (diff)
parentb70b962892b2428557d95a9639fbcead4fe546fd (diff)
downloadgitlab-ce-4bdfb0391a578847fde5589eb44ac6737c9e4b64.tar.gz
Merge branch 'master' into 'dz-remove-namespaces-path-uniq'
Merge Request - https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8013 # Conflicts: # db/schema.rb
Diffstat (limited to 'lib/gitlab/allowable.rb')
-rw-r--r--lib/gitlab/allowable.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gitlab/allowable.rb b/lib/gitlab/allowable.rb
new file mode 100644
index 00000000000..f48abcc86d5
--- /dev/null
+++ b/lib/gitlab/allowable.rb
@@ -0,0 +1,7 @@
+module Gitlab
+ module Allowable
+ def can?(user, action, subject)
+ Ability.allowed?(user, action, subject)
+ end
+ end
+end