mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-21 22:44:35 +00:00
Merge remote-tracking branch 'upstream/stable-4.4' into HEAD
Conflicts: - `app/views/layouts/application.html.haml`: Conflict because of glitch-soc's theming system. Updated the line as upstream did.
This commit is contained in:
@@ -142,7 +142,9 @@ class User < ApplicationRecord
|
||||
delegate :can?, to: :role
|
||||
|
||||
attr_reader :invite_code, :date_of_birth
|
||||
attr_writer :external, :bypass_registration_checks, :current_account
|
||||
attr_writer :external, :current_account
|
||||
|
||||
attribute :bypass_registration_checks, :boolean, default: false
|
||||
|
||||
def self.those_who_can(*any_of_privileges)
|
||||
matching_role_ids = UserRole.that_can(*any_of_privileges).map(&:id)
|
||||
@@ -505,10 +507,6 @@ class User < ApplicationRecord
|
||||
!!@external
|
||||
end
|
||||
|
||||
def bypass_registration_checks?
|
||||
@bypass_registration_checks
|
||||
end
|
||||
|
||||
def sanitize_role
|
||||
self.role = nil if role.present? && role.everyone?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user