mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-12 11:45:02 +08:00
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.
13 lines
369 B
Ruby
Vendored
13 lines
369 B
Ruby
Vendored
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
|