discourse/lib/migration/helpers.rb
Martin Brennan 9a6fe5c370
FIX: Do not show new upcoming change dot on new sites and new staff (#39682)
When a site is created, any staff users created in that
period should not see a blue dot for the upcoming change
link in the admin sidebar, we don't need to notify them
of "new" upcoming changes when they have only just joined.

Additionally, any new admins or moderators created later
on should also not immediately see a blue dot in the
upcoming change sidebar, though these changes are "new"
to them, they could potentially be quite old upcoming changes.
2026-05-05 12:02:08 +10:00

17 lines
273 B
Ruby

# frozen_string_literal: true
module Migration
module Helpers
def self.site_created_at
Discourse.site_creation_date
end
def self.existing_site?
site_created_at < 1.hour.ago
end
def self.new_site?
!existing_site?
end
end
end