0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-09 11:52:54 +01:00

Check if admin when including wizard required on the site serializer

Dieser Commit ist enthalten in:
Angus McLeod 2017-11-03 21:43:57 +08:00
Ursprung 68b6e34b55
Commit 85c436c59e

Datei anzeigen

@ -109,4 +109,10 @@ after_initialize do
end
add_to_serializer(:current_user, :redirect_to_wizard) { object.custom_fields['redirect_to_wizard'] }
SiteSerializer.class_eval do
def include_wizard_required?
scope.is_admin? && Wizard.user_requires_completion?(scope.user)
end
end
end