Fix POST /api/v1/accounts still being accessible when SSO_ACCOUNT_SIGN_UP is set (#40681)

This commit is contained in:
Claire
2026-09-24 12:28:59 +00:00
committed by GitHub
parent cd4e10bb1d
commit f109aef701

View File

@@ -128,6 +128,6 @@ class Api::V1::AccountsController < Api::BaseController
end
def check_enabled_registrations
forbidden unless allowed_registration?(request.remote_ip, invite)
forbidden if ENV['SSO_ACCOUNT_SIGN_UP'].present? || !allowed_registration?(request.remote_ip, invite)
end
end