Skip to content

THREESCALE-12325: Disable tenant signup#4242

Merged
jlledom merged 2 commits into
3scale:masterfrom
jlledom:THREESCALE-12325-remove-tenant-signup
Mar 5, 2026
Merged

THREESCALE-12325: Disable tenant signup#4242
jlledom merged 2 commits into
3scale:masterfrom
jlledom:THREESCALE-12325-remove-tenant-signup

Conversation

@jlledom
Copy link
Copy Markdown
Contributor

@jlledom jlledom commented Mar 3, 2026

What this PR does / why we need it:

This adds a new setting provider_signup_form_enabled and the env variable PROVIDER_SIGNUP_FORM_ENABLED to enable tenants signup form from master portal. It's set to false by default.

Which issue(s) this PR fixes

https://issues.redhat.com/browse/THREESCALE-12325

Verification steps

  1. Access master portal /p/signup. You should see "Provider signup not enabled."
  2. Set PROVIDER_SIGNUP_ENABLED to 1 and restart
  3. Access master portal /p/signup. You should see the signup form

@jlledom jlledom self-assigned this Mar 3, 2026
@jlledom jlledom changed the title Threescale 12325 remove tenant signup THREESCALE-12325: Disable tenant signup Mar 3, 2026
end

test 'returns not found when signup is disabled' do
Account.any_instance.unstub(:signup_provider_possible?)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was it stubbed before?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope AFAIK, but Claude was extra careful I guess

akostadinov
akostadinov previously approved these changes Mar 4, 2026
@jlledom jlledom force-pushed the THREESCALE-12325-remove-tenant-signup branch from 044c4d8 to c8851b1 Compare March 4, 2026 10:13
Copy link
Copy Markdown
Contributor

@mayorova mayorova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's nice that it's a simple and effective change, however it has a side-effect, that I think is undesired.

With this approach, the "Tenant Create" endpoint in the Master API stops working too - and it is not desirable.

So, we need to somehow only check this new setting in the #ensure_signup_possible in the signups controller, but not in #ensure_master_with_plans in Master::Api::ProvidersController.

Also, in the former - maybe adjust the error that is reported from Provider signup not enabled. Check all master\'s plans are in place. to something more generic (because it might be disabled explicitly, not because of the plans)

@jlledom
Copy link
Copy Markdown
Contributor Author

jlledom commented Mar 4, 2026

With this approach, the "Tenant Create" endpoint in the Master API stops working too - and it is not desirable.

Right! I fixed it: f1d8073

Also, in the former - maybe adjust the error that is reported from Provider signup not enabled. Check all master\'s plans are in place. to something more generic (because it might be disabled explicitly, not because of the plans)

Also updated in that commit. I updated the test suite accordingly as well.


def setup
host! master_account.external_domain
Account.any_instance.stubs(:signup_provider_possible?).returns(true)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead code, the stb does nothing

@mayorova
Copy link
Copy Markdown
Contributor

mayorova commented Mar 5, 2026

It would be nice to upgrade the PR description, to avoid confusion in future.

@jlledom
Copy link
Copy Markdown
Contributor Author

jlledom commented Mar 5, 2026

It would be nice to upgrade the PR description, to avoid confusion in future.

Done.

Copy link
Copy Markdown
Contributor

@mayorova mayorova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

jlledom and others added 2 commits March 5, 2026 12:50
Disabled by default

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@jlledom jlledom force-pushed the THREESCALE-12325-remove-tenant-signup branch from e279304 to 7dbcf84 Compare March 5, 2026 11:50
@jlledom jlledom merged commit b017f80 into 3scale:master Mar 5, 2026
16 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants