diff options
author | http://jneen.net/ <jneen@jneen.net> | 2017-06-22 11:08:40 -0700 |
---|---|---|
committer | http://jneen.net/ <jneen@jneen.net> | 2017-06-27 12:41:54 -0700 |
commit | e5aad75a2673b2e4465d311cbd27970d5c81d5f7 (patch) | |
tree | ff6fb5b4e0a4aa94d68a9262ad8482dfe00cdebd /lib | |
parent | 963b374dc7ca077aeb97c6a3a79605e2646631d1 (diff) | |
download | gitlab-ce-e5aad75a2673b2e4465d311cbd27970d5c81d5f7.tar.gz |
implement Presenter::Base#declarative_policy_delegate
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/view/presenter/base.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gitlab/view/presenter/base.rb b/lib/gitlab/view/presenter/base.rb index dbfe0941e4d..841fb681435 100644 --- a/lib/gitlab/view/presenter/base.rb +++ b/lib/gitlab/view/presenter/base.rb @@ -15,6 +15,11 @@ module Gitlab super(user, action, overriden_subject || subject) end + # delegate all #can? queries to the subject + def declarative_policy_delegate + subject + end + class_methods do def presenter? true |