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:
Claire
2025-09-04 18:33:21 +02:00
45 changed files with 416 additions and 236 deletions

View File

@@ -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