Merge remote-tracking branch 'parent/main' into upstream-20240128
This commit is contained in:
commit
3e065f4e12
200 changed files with 2190 additions and 738 deletions
|
@ -60,16 +60,12 @@ class Settings::ApplicationsController < Settings::BaseController
|
|||
end
|
||||
|
||||
def application_params
|
||||
params.require(:doorkeeper_application).permit(
|
||||
:name,
|
||||
:redirect_uri,
|
||||
:scopes,
|
||||
:website
|
||||
)
|
||||
params
|
||||
.expect(doorkeeper_application: [:name, :redirect_uri, :scopes, :website])
|
||||
end
|
||||
|
||||
def prepare_scopes
|
||||
scopes = params.fetch(:doorkeeper_application, {}).fetch(:scopes, nil)
|
||||
scopes = application_params.fetch(:doorkeeper_application, {}).fetch(:scopes, nil)
|
||||
params[:doorkeeper_application][:scopes] = scopes.join(' ') if scopes.is_a? Array
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,10 +25,10 @@ class Settings::Preferences::BaseController < Settings::BaseController
|
|||
end
|
||||
|
||||
def original_user_params
|
||||
params.require(:user).permit(:locale, :time_zone, :custom_css_text, chosen_languages: [], settings_attributes: UserSettings.keys)
|
||||
params.expect(user: [:locale, :time_zone, :custom_css_text, chosen_languages: [], settings_attributes: UserSettings.keys])
|
||||
end
|
||||
|
||||
def disabled_visibilities_params
|
||||
params.require(:user).permit(settings_attributes: { enabled_visibilities: [] })
|
||||
params.expect(user: [settings_attributes: { enabled_visibilities: [] }])
|
||||
end
|
||||
end
|
||||
|
|
|
@ -38,7 +38,7 @@ module Settings
|
|||
private
|
||||
|
||||
def confirmation_params
|
||||
params.require(:form_two_factor_confirmation).permit(:otp_attempt)
|
||||
params.expect(form_two_factor_confirmation: [:otp_attempt])
|
||||
end
|
||||
|
||||
def prepare_two_factor_form
|
||||
|
|
|
@ -18,7 +18,7 @@ class Settings::VerificationsController < Settings::BaseController
|
|||
private
|
||||
|
||||
def account_params
|
||||
params.require(:account).permit(:attribution_domains).tap do |params|
|
||||
params.expect(account: [:attribution_domains]).tap do |params|
|
||||
params[:attribution_domains] = params[:attribution_domains].split if params[:attribution_domains]
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue