debian-mirror-gitlab/lib/gitlab/base_doorkeeper_controller.rb

18 lines
490 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
2018-05-09 12:01:36 +05:30
# This is a base controller for doorkeeper.
# It adds the `can?` helper used in the views.
module Gitlab
2022-10-11 01:57:18 +05:30
# rubocop:disable Rails/ApplicationController
2018-05-09 12:01:36 +05:30
class BaseDoorkeeperController < ActionController::Base
include Gitlab::Allowable
2020-08-18 19:51:02 +05:30
include EnforcesTwoFactorAuthentication
2022-07-23 23:45:48 +05:30
include SessionsHelper
before_action :limit_session_time, if: -> { !current_user }
2020-08-18 19:51:02 +05:30
2018-05-09 12:01:36 +05:30
helper_method :can?
end
2022-10-11 01:57:18 +05:30
# rubocop:enable Rails/ApplicationController
2018-05-09 12:01:36 +05:30
end