mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 07:02:46 +08:00
8c71878ff5
This PR adds an extra description to the 2FA page when granting a user admin access. It also introduces a general system for adding customized descriptions that can be used by future actions.
(Follow-up to dd6ec65061
)
21 lines
492 B
Ruby
21 lines
492 B
Ruby
# frozen_string_literal: true
|
|
|
|
class TestSecondFactorAction < SecondFactor::Actions::Base
|
|
def no_second_factors_enabled!(params)
|
|
end
|
|
|
|
def second_factor_auth_required!(params)
|
|
{
|
|
redirect_path: params[:redirect_path],
|
|
callback_params: {
|
|
saved_param_1: params[:saved_param_1],
|
|
saved_param_2: params[:saved_param_2]
|
|
},
|
|
description: "this is description for test action"
|
|
}
|
|
end
|
|
|
|
def second_factor_auth_completed!(callback_params)
|
|
end
|
|
end
|