debian-mirror-gitlab/app/controllers/concerns/initializes_current_user_mode.rb

14 lines
265 B
Ruby
Raw Normal View History

2020-01-01 13:55:28 +05:30
# frozen_string_literal: true
module InitializesCurrentUserMode
extend ActiveSupport::Concern
included do
helper_method :current_user_mode
end
def current_user_mode
@current_user_mode ||= Gitlab::Auth::CurrentUserMode.new(current_user)
end
end