gitlab-org--gitlab-foss/lib/gitlab/base_doorkeeper_controller.rb
Bob Van Landuyt 0f593b1c57 Define custom base controller for Doorkeeper
Since we only need the `can?` view helpers there, it's better to
include those in a separate controller.

If we inherit from `ApplicationController` we also need to deal with
authentication, that needs to be done in some, but not all doorkeeper controllers.
2018-04-30 11:40:51 +02:00

8 lines
227 B
Ruby

# This is a base controller for doorkeeper.
# It adds the `can?` helper used in the views.
module Gitlab
class BaseDoorkeeperController < ActionController::Base
include Gitlab::Allowable
helper_method :can?
end
end