gitlab-org--gitlab-foss/lib/gitlab/base_doorkeeper_controller.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
490 B
Ruby
Raw Normal View History

# frozen_string_literal: true
# This is a base controller for doorkeeper.
# It adds the `can?` helper used in the views.
module Gitlab
# rubocop:disable Rails/ApplicationController
class BaseDoorkeeperController < ActionController::Base
include Gitlab::Allowable
include EnforcesTwoFactorAuthentication
include SessionsHelper
before_action :limit_session_time, if: -> { !current_user }
helper_method :can?
end
# rubocop:enable Rails/ApplicationController
end