From fb5e6165c3f56beccab9d61bfaf2449b900fb18f Mon Sep 17 00:00:00 2001 From: Riccardo Graziosi <31478034+riggraz@users.noreply.github.com> Date: Mon, 3 Mar 2025 17:51:26 +0100 Subject: [PATCH] Disable tenant registration (#461) * Disable tenant registration * Disable Stripe subscription management * Fix OAuth broken link * Remove managed version info from README --- README.md | 22 +--- app/controllers/tenants_controller.rb | 3 + app/javascript/components/Billing/index.tsx | 11 +- .../Authentication/OAuthProvidersList.tsx | 2 +- .../components/TenantSignUp/TenantSignUpP.tsx | 110 ++++++++++-------- 5 files changed, 76 insertions(+), 72 deletions(-) diff --git a/README.md b/README.md index b8e45f17..9cd05949 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,11 @@

- - - +

Astuto - An open source customer feedback tool 🦊 | Product Hunt Embed

✨ Try it out -  â€¢  - 📖 Learn more

@@ -31,22 +27,6 @@ Astuto is an open source customer feedback tool. It helps you collect, manage an ## Get started -### Hosted - -We offer a hosted solution, so you don't have to provision your own server. This is the easiest and fastest way to get started: you can sign up and start collecting feedback in a few minutes. - -[Start your 7-day free trial](https://login.astuto.io/signup) without entering any payment method, then it's 15 €/month with annual subscription or 20 €/month with monthly subscription. [Learn more on astuto.io](https://astuto.io/?utm_campaign=github_getstarted&utm_source=github.com). - -With the paid plan: - -- You avoid deployment hassles like renting a server, issuing SSL certificates, configuring a mail server and managing updates -- You get some OAuth providers out of the box: Google, Facebook and GitHub are ready to log your users in, no configuration needed -- You get priority support -- You support open source and get our eternal gratitude :) - - -### Self-hosted - Read the [Deploy with Docker instructions](https://docs.astuto.io/deploy-docker) for the most comprehensive and up to date guide on installing and configuring Astuto. What you find below are minimal instructions to get you started as quickly as possible: diff --git a/app/controllers/tenants_controller.rb b/app/controllers/tenants_controller.rb index 6bc4a21a..1b851f14 100644 --- a/app/controllers/tenants_controller.rb +++ b/app/controllers/tenants_controller.rb @@ -15,6 +15,9 @@ class TenantsController < ApplicationController end def create + # NOTE: new tenants registrations disabled + raise "Tenant registration disabled" + @tenant = Tenant.new @tenant.assign_attributes(tenant_create_params) authorize @tenant diff --git a/app/javascript/components/Billing/index.tsx b/app/javascript/components/Billing/index.tsx index 083ab0fd..45689fee 100644 --- a/app/javascript/components/Billing/index.tsx +++ b/app/javascript/components/Billing/index.tsx @@ -125,7 +125,7 @@ const Billing = ({

Subscription {isExpired ? 'expired' : 'expires'} on {subscriptionEndsAtFormatted}

} - { + {/* { (tenantBilling.status === TENANT_BILLING_STATUS_TRIAL) && chosenPrice === null && - } + } */} + +

+ If you want to manage your current subscription, please contact us via email. +

+

+ We do not accept new subscriptions right now. +

window.open('https://astuto.io/terms-of-service', '_blank')} icon={}> diff --git a/app/javascript/components/SiteSettings/Authentication/OAuthProvidersList.tsx b/app/javascript/components/SiteSettings/Authentication/OAuthProvidersList.tsx index 16e2a380..4b1ab76a 100644 --- a/app/javascript/components/SiteSettings/Authentication/OAuthProvidersList.tsx +++ b/app/javascript/components/SiteSettings/Authentication/OAuthProvidersList.tsx @@ -35,7 +35,7 @@ const OAuthProvidersList = ({

window.open('https://docs.astuto.io/category/oauth-configuration/', '_blank')} + onClick={() => window.open('https://docs.astuto.io/oauth/oauth-configuration-basics/', '_blank')} icon={} > {I18n.t('site_settings.authentication.learn_more')} diff --git a/app/javascript/components/TenantSignUp/TenantSignUpP.tsx b/app/javascript/components/TenantSignUp/TenantSignUpP.tsx index b16035e9..b1e61774 100644 --- a/app/javascript/components/TenantSignUp/TenantSignUpP.tsx +++ b/app/javascript/components/TenantSignUp/TenantSignUpP.tsx @@ -7,6 +7,7 @@ import ConfirmEmailSignUpPage from './ConfirmEmailSignUpPage'; import ConfirmOAuthSignUpPage from './ConfirmOAuthSignUpPage'; import { IOAuth } from '../../interfaces/IOAuth'; import HttpStatus from '../../constants/http_status'; +import Box from '../common/Box'; interface Props { oAuthLoginCompleted: boolean; @@ -116,57 +117,70 @@ const TenantSignUpP = ({ }); } + // return ( + // <> + // + + //

+ // { + // (currentStep === 1 || currentStep === 2) && + // + // } + + // { + // (goneBack || currentStep === 2) && + // + // } + + // { + // currentStep === 3 && authMethod === 'oauth' && + // + // } + + // { + // currentStep === 3 && authMethod === 'email' && + // + // } + //
+ // + // ); + return ( <> - - -
- { - (currentStep === 1 || currentStep === 2) && - - } - - { - (goneBack || currentStep === 2) && - - } - - { - currentStep === 3 && authMethod === 'oauth' && - - } - - { - currentStep === 3 && authMethod === 'email' && - - } -
+ + +
+ +

It is not possible to sign up to Astuto.

+

You can self-host your own instance instead.

+
+
- ); + ) } export default TenantSignUpP; \ No newline at end of file