Welcome to mirror list, hosted at ThFree Co, Russian Federation.

base_doorkeeper_controller.rb « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 81b013955420123d90a9ffcb8421acf0c94fb3f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

# 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
    include EnforcesTwoFactorAuthentication
    include SessionsHelper

    before_action :limit_session_time, if: -> { !current_user }

    helper_method :can?
  end
end