Merge commit 'c62604b5f6
' into kb_migration
This commit is contained in:
commit
a1f6ef00db
86 changed files with 929 additions and 221 deletions
15
lib/action_controller/conditional_get_extensions.rb
Normal file
15
lib/action_controller/conditional_get_extensions.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ActionController
|
||||
module ConditionalGetExtensions
|
||||
def expires_in(*)
|
||||
# This backports a fix from Rails 7 so that a more private Cache-Control
|
||||
# can be overriden by calling expires_in on a specific controller action
|
||||
response.cache_control.delete(:no_store)
|
||||
|
||||
super
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ActionController::ConditionalGet.prepend(ActionController::ConditionalGetExtensions)
|
|
@ -189,9 +189,10 @@ module Mastodon
|
|||
user.disabled = true if options[:disable]
|
||||
user.approved = true if options[:approve]
|
||||
user.otp_required_for_login = false if options[:disable_2fa]
|
||||
user.confirm if options[:confirm]
|
||||
|
||||
if user.save
|
||||
user.confirm if options[:confirm]
|
||||
|
||||
say('OK', :green)
|
||||
say("New password: #{password}") if options[:reset_password]
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue