]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'main' into glitch-soc/merge-upstream
authorClaire <claire.github-309c@sitedethib.com>
Wed, 6 Apr 2022 19:10:23 +0000 (21:10 +0200)
committerClaire <claire.github-309c@sitedethib.com>
Wed, 6 Apr 2022 19:10:23 +0000 (21:10 +0200)
Conflicts:
- `app/controllers/concerns/sign_in_token_authentication_concern.rb`:
  Upstream removed this file, while glitch-soc had changes to deal with
  its theming system.
  Removed the file like upstream did.

1  2 
app/controllers/auth/sessions_controller.rb
app/models/user.rb
app/services/remove_status_service.rb
config/routes.rb

index 8607077f71e4c01bb21fab71e32866fd0d3ef81e,c4c8151e33314b5a61fdc9acb4da34f19894a72f..056f8a9f101796a85949f0da77bcf6ad8ab174a8
@@@ -7,10 -7,7 +7,9 @@@ class Auth::SessionsController < Devise
    skip_before_action :require_functional!
    skip_before_action :update_user_sign_in
  
 +  prepend_before_action :set_pack
 +
    include TwoFactorAuthenticationConcern
-   include SignInTokenAuthenticationConcern
  
    before_action :set_instance_presenter, only: [:new]
    before_action :set_body_classes
index 76ad7d1b208e9230d97173df75f6659da936b69a,d19fe2c92ce223b3e102875fdff3d44a87bb1805..5dd93519c87b2f0d529550027fa37f6eddc5bea9
@@@ -125,14 -126,14 +126,14 @@@ class User < ApplicationRecor
  
    has_many :session_activations, dependent: :destroy
  
 -  delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :delete_modal,
 -           :reduce_motion, :system_font_ui, :noindex, :theme, :display_media,
 +  delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :favourite_modal, :delete_modal,
 +           :reduce_motion, :system_font_ui, :noindex, :flavour, :skin, :display_media, :hide_followers_count,
             :expand_spoilers, :default_language, :aggregate_reblogs, :show_application,
             :advanced_layout, :use_blurhash, :use_pending_items, :trends, :crop_images,
 -           :disable_swiping,
 +           :disable_swiping, :default_content_type, :system_emoji_font,
             to: :settings, prefix: :setting, allow_nil: false
  
-   attr_reader :invite_code, :sign_in_token_attempt
+   attr_reader :invite_code
    attr_writer :external, :bypass_invite_request_check
  
    def confirmed?
      !account.memorial?
    end
  
-   def suspicious_sign_in?(ip)
-     !otp_required_for_login? && !skip_sign_in_token? && current_sign_in_at.present? && !ips.where(ip: ip).exists?
-   end
    def functional?
 -    confirmed? && approved? && !disabled? && !account.suspended? && !account.memorial? && account.moved_to_account_id.nil?
 +    confirmed? && approved? && !disabled? && !account.suspended? && !account.memorial?
    end
  
    def unconfirmed?
Simple merge
Simple merge