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: 91994c2fa9535b933d2cd527d63b3b497a615bc0 (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 < BaseActionController
    include Gitlab::Allowable
    include EnforcesTwoFactorAuthentication
    include SessionsHelper

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

    helper_method :can?
  end
end