mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 19:30:42 +08:00
c03d25f170
Adds a "Step 0" to the wizard if the site has no admin accounts where the user is prompted to finish setting up their admin account from the list of acceptable email addresses. Once confirmed, the wizard begins.
14 lines
369 B
Ruby
14 lines
369 B
Ruby
class HomePageConstraint
|
|
def initialize(filter)
|
|
@filter = filter
|
|
end
|
|
|
|
def matches?(request)
|
|
return @filter == 'finish_installation' if SiteSetting.has_login_hint?
|
|
|
|
provider = Discourse.current_user_provider.new(request.env)
|
|
homepage = provider.current_user ? SiteSetting.homepage : SiteSetting.anonymous_homepage
|
|
homepage == @filter
|
|
end
|
|
end
|