diff --git a/analytics/views.py b/analytics/views.py index 8b02ef5ac7..69ea417d6e 100644 --- a/analytics/views.py +++ b/analytics/views.py @@ -471,7 +471,7 @@ def realm_summary_table(realm_minutes: Dict[str, float]) -> str: for row in rows: row['date_created_day'] = row['date_created'].strftime('%Y-%m-%d') row['plan_type_string'] = [ - '', 'self hosted', 'limited', 'premium', 'premium free'][row['plan_type']] + '', 'self hosted', 'limited', 'standard', 'standard free'][row['plan_type']] row['age_days'] = int((now - row['date_created']).total_seconds() / 86400) row['is_new'] = row['age_days'] < 12 * 7 diff --git a/corporate/lib/stripe.py b/corporate/lib/stripe.py index 940a135fed..59561dfd8b 100644 --- a/corporate/lib/stripe.py +++ b/corporate/lib/stripe.py @@ -277,7 +277,7 @@ def process_initial_upgrade(user: UserProfile, plan: Plan, seat_count: int, stri # TODO: billing address details are passed to us in the request; # use that to calculate taxes. tax_percent=0) - do_change_plan_type(user, Realm.PREMIUM) + do_change_plan_type(user, Realm.STANDARD) def attach_discount_to_realm(user: UserProfile, percent_off: int) -> None: coupon = Coupon.objects.get(percent_off=percent_off) diff --git a/corporate/management/commands/setup_stripe.py b/corporate/management/commands/setup_stripe.py index 04e4823f2e..4e862103bf 100644 --- a/corporate/management/commands/setup_stripe.py +++ b/corporate/management/commands/setup_stripe.py @@ -17,9 +17,9 @@ class Command(ZulipBaseCommand): # Zulip Cloud offerings product = stripe.Product.create( - name="Zulip Cloud Premium", + name="Zulip Cloud Standard", type='service', - statement_descriptor="Zulip Cloud Premium", + statement_descriptor="Zulip Cloud Standard", unit_label="user") plan = stripe.Plan.create( diff --git a/corporate/tests/stripe_fixtures.json b/corporate/tests/stripe_fixtures.json index 026dab5935..bd6b4ce61a 100644 --- a/corporate/tests/stripe_fixtures.json +++ b/corporate/tests/stripe_fixtures.json @@ -347,7 +347,7 @@ { "amount": 64000, "currency": "usd", - "description": "8 user \u00d7 Zulip Cloud Premium (at $80.00 / year)", + "description": "8 user \u00d7 Zulip Cloud Standard (at $80.00 / year)", "discountable": true, "id": "sub_D7OTT8FZbOPxah", "livemode": false, diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.1.json b/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.1.json index 00e13df415..4b5af0aaa7 100644 Binary files a/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.1.json and b/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.1.json differ diff --git a/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.2.json b/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.2.json index 00e13df415..4b5af0aaa7 100644 Binary files a/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.2.json and b/corporate/tests/stripe_fixtures/billing_page_permissions:Invoice.upcoming.2.json differ diff --git a/corporate/tests/stripe_fixtures/setUp:Product.create.1.json b/corporate/tests/stripe_fixtures/setUp:Product.create.1.json index 8564be0093..295cf23638 100644 Binary files a/corporate/tests/stripe_fixtures/setUp:Product.create.1.json and b/corporate/tests/stripe_fixtures/setUp:Product.create.1.json differ diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py index 9593f59750..cda87eac8f 100644 --- a/corporate/tests/test_stripe.py +++ b/corporate/tests/test_stripe.py @@ -203,7 +203,7 @@ class StripeTest(ZulipTestCase): response = self.client_get("/upgrade/") self.assert_in_success_response(['We can also bill by invoice'], response) self.assertFalse(user.realm.has_seat_based_plan) - self.assertNotEqual(user.realm.plan_type, Realm.PREMIUM) + self.assertNotEqual(user.realm.plan_type, Realm.STANDARD) self.assertFalse(Customer.objects.filter(realm=user.realm).exists()) # Click "Make payment" in Stripe Checkout @@ -246,8 +246,8 @@ class StripeTest(ZulipTestCase): # Check that we correctly updated Realm realm = get_realm("zulip") self.assertTrue(realm.has_seat_based_plan) - self.assertEqual(realm.plan_type, Realm.PREMIUM) - self.assertEqual(realm.max_invites, Realm.INVITES_PREMIUM_REALM_DAILY_MAX) + self.assertEqual(realm.plan_type, Realm.STANDARD) + self.assertEqual(realm.max_invites, Realm.INVITES_STANDARD_REALM_DAILY_MAX) # Check that we can no longer access /upgrade response = self.client_get("/upgrade/") self.assertEqual(response.status_code, 302) @@ -393,7 +393,7 @@ class StripeTest(ZulipTestCase): 'salt': self.salt, 'plan': Plan.CLOUD_ANNUAL }) - self.assert_in_success_response(["Upgrade to Zulip Premium"], response) + self.assert_in_success_response(["Upgrade to Zulip Standard"], response) self.assertEqual(response['error_description'], 'tampered seat count') def test_upgrade_with_tampered_plan(self) -> None: @@ -404,7 +404,7 @@ class StripeTest(ZulipTestCase): 'salt': self.salt, 'plan': "invalid" }) - self.assert_in_success_response(["Upgrade to Zulip Premium"], response) + self.assert_in_success_response(["Upgrade to Zulip Standard"], response) self.assertEqual(response['error_description'], 'tampered plan') @patch("stripe.Customer.retrieve", side_effect=mock_customer_with_subscription) @@ -491,7 +491,7 @@ class StripeTest(ZulipTestCase): mock_save_customer: Mock, mock_delete_subscription: Mock) -> None: realm = get_realm('zulip') realm.has_seat_based_plan = True - realm.plan_type = Realm.PREMIUM + realm.plan_type = Realm.STANDARD realm.save(update_fields=['has_seat_based_plan', 'plan_type']) Customer.objects.create( realm=realm, stripe_customer_id=self.stripe_customer_id, has_billing_relationship=True) diff --git a/corporate/views.py b/corporate/views.py index 7f44bd81fa..018b2b7bd5 100644 --- a/corporate/views.py +++ b/corporate/views.py @@ -74,7 +74,7 @@ def initial_upgrade(request: HttpRequest) -> HttpResponse: 'seat_count': seat_count, 'signed_seat_count': signed_seat_count, 'salt': salt, - 'plan': "Zulip Premium", + 'plan': "Zulip Standard", 'nickname_monthly': Plan.CLOUD_MONTHLY, 'nickname_annual': Plan.CLOUD_ANNUAL, 'error_message': error_message, @@ -87,8 +87,8 @@ def initial_upgrade(request: HttpRequest) -> HttpResponse: return response PLAN_NAMES = { - Plan.CLOUD_ANNUAL: "Zulip Premium (billed annually)", - Plan.CLOUD_MONTHLY: "Zulip Premium (billed monthly)", + Plan.CLOUD_ANNUAL: "Zulip Standard (billed annually)", + Plan.CLOUD_MONTHLY: "Zulip Standard (billed monthly)", } @zulip_login_required diff --git a/static/styles/landing-page.scss b/static/styles/landing-page.scss index d0252d5a4d..deffac65be 100644 --- a/static/styles/landing-page.scss +++ b/static/styles/landing-page.scss @@ -2913,7 +2913,7 @@ nav ul li.active::after { animation: box-shadow-pulse 2s infinite; } -.pricing-model .pricing-container .text-content .premium-price-box { +.pricing-model .pricing-container .text-content .standard-price-box { display: flex; } diff --git a/templates/corporate/upgrade.html b/templates/corporate/upgrade.html index 519d1c00d9..6561931bf8 100644 --- a/templates/corporate/upgrade.html +++ b/templates/corporate/upgrade.html @@ -61,7 +61,7 @@ data-key="{{ publishable_key }}" data-image="/static/images/logo/zulip-icon-128x128.png" data-name="Zulip" - data-description="Zulip Cloud Premium" + data-description="Zulip Cloud Standard" data-locale="auto" data-zip-code="true" data-billing-address="true" diff --git a/templates/zerver/faq.html b/templates/zerver/faq.html index 5e42d0d197..cbe4c34348 100644 --- a/templates/zerver/faq.html +++ b/templates/zerver/faq.html @@ -11,7 +11,7 @@ entities?

- Yes! Zulip Cloud Premium is free for open source + Yes! Zulip Cloud Standard is free for open source projects and affiliated institutions. We also offer steep discounts to non-profits, educational institutions, groups of friends, and in scenarios where diff --git a/templates/zerver/help/export-your-organization.md b/templates/zerver/help/export-your-organization.md index cfd1409223..fa5c8b7258 100644 --- a/templates/zerver/help/export-your-organization.md +++ b/templates/zerver/help/export-your-organization.md @@ -19,7 +19,7 @@ three types of zulipchat.com exports. * **Full export without member consent**: All the data in the organization. All organizations have access to the first two kinds of export. Only corporate -Zulip Premium customers have access to **full export without member consent**. +Zulip Standard customers have access to **full export without member consent**. ## Request an export @@ -64,7 +64,7 @@ in place. Note that many countries have laws that require employers to notify employees of their use of such an export. **Full export without member consent** is additionally limited to paid -Zulip Premium customers, though in rare cases may be available to +Zulip Standard customers, though in rare cases may be available to other organizations in case of due legal process. ## Related articles diff --git a/templates/zerver/plans.html b/templates/zerver/plans.html index c951b2f884..145fd8e048 100644 --- a/templates/zerver/plans.html +++ b/templates/zerver/plans.html @@ -59,7 +59,7 @@

-

Premium

+

Standard

Make Zulip your home
@@ -75,7 +75,7 @@
-
+
6.67
per active user per month @@ -90,13 +90,13 @@ {% elif realm_plan_type == 2 %} {% else %} {% endif %} @@ -121,7 +121,7 @@
  • Easy self-service installation
  • Free and open source forever under Apache 2.0 license
  • LDAP/Active directory integration
  • -
  • All Premium/Enterprise features included
  • +
  • All Standard/Enterprise features included
  • diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index 31feae469b..6cf6e76978 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -3069,10 +3069,10 @@ def do_change_plan_type(user: UserProfile, plan_type: int) -> None: realm=realm, acting_user=user, event_time=timezone_now(), extra_data={'old_value': old_value, 'new_value': plan_type}) - if plan_type == Realm.PREMIUM: - realm.max_invites = Realm.INVITES_PREMIUM_REALM_DAILY_MAX - elif plan_type == Realm.PREMIUM_FREE: - realm.max_invites = Realm.INVITES_PREMIUM_REALM_DAILY_MAX + if plan_type == Realm.STANDARD: + realm.max_invites = Realm.INVITES_STANDARD_REALM_DAILY_MAX + elif plan_type == Realm.STANDARD_FREE: + realm.max_invites = Realm.INVITES_STANDARD_REALM_DAILY_MAX elif plan_type == Realm.LIMITED: realm.max_invites = settings.INVITES_DEFAULT_REALM_DAILY_MAX realm.save(update_fields=['_max_invites']) diff --git a/zerver/models.py b/zerver/models.py index 77cb1bb227..f7af358565 100644 --- a/zerver/models.py +++ b/zerver/models.py @@ -143,7 +143,7 @@ class Realm(models.Model): MAX_REALM_SUBDOMAIN_LENGTH = 40 MAX_VIDEO_CHAT_PROVIDER_LENGTH = 40 MAX_GOOGLE_HANGOUTS_DOMAIN_LENGTH = 255 # This is just the maximum domain length by RFC - INVITES_PREMIUM_REALM_DAILY_MAX = 3000 + INVITES_STANDARD_REALM_DAILY_MAX = 3000 VIDEO_CHAT_PROVIDERS = [u"Jitsi", u"Google Hangouts"] AUTHENTICATION_FLAGS = [u'Google', u'Email', u'GitHub', u'LDAP', u'Dev', u'RemoteUser'] SUBDOMAIN_FOR_ROOT_DOMAIN = '' @@ -229,8 +229,8 @@ class Realm(models.Model): # like zulipchat.com. SELF_HOSTED = 1 LIMITED = 2 - PREMIUM = 3 - PREMIUM_FREE = 4 + STANDARD = 3 + STANDARD_FREE = 4 plan_type = models.PositiveSmallIntegerField(default=SELF_HOSTED) # type: int # This value is also being used in static/js/settings_bots.bot_creation_policy_values. diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py index 58a2f505ef..4d762e1ca2 100644 --- a/zerver/tests/test_docs.py +++ b/zerver/tests/test_docs.py @@ -331,7 +331,7 @@ class PlansPageTest(ZulipTestCase): self.assert_in_success_response(["does not exist"], result) # Test valid domain, no login realm = get_realm("zulip") - realm.plan_type = Realm.PREMIUM_FREE + realm.plan_type = Realm.STANDARD_FREE realm.save(update_fields=["plan_type"]) result = self.client_get("/plans/", subdomain="zulip") self.assertEqual(result.status_code, 302) @@ -348,12 +348,12 @@ class PlansPageTest(ZulipTestCase): def test_CTA_text_by_plan_type(self) -> None: sign_up_now = "Sign up now" - buy_premium = "Buy Premium" + buy_standard = "Buy Standard" current_plan = "Current plan" # Root domain result = self.client_get("/plans/", subdomain="") - self.assert_in_success_response([sign_up_now, buy_premium], result) + self.assert_in_success_response([sign_up_now, buy_standard], result) self.assert_not_in_success_response([current_plan], result) realm = get_realm("zulip") @@ -373,17 +373,17 @@ class PlansPageTest(ZulipTestCase): realm.plan_type = Realm.LIMITED realm.save(update_fields=["plan_type"]) result = self.client_get("/plans/", subdomain="zulip") - self.assert_in_success_response([current_plan, buy_premium], result) + self.assert_in_success_response([current_plan, buy_standard], result) self.assert_not_in_success_response([sign_up_now], result) - realm.plan_type = Realm.PREMIUM_FREE + realm.plan_type = Realm.STANDARD_FREE realm.save(update_fields=["plan_type"]) result = self.client_get("/plans/", subdomain="zulip") self.assert_in_success_response([current_plan], result) - self.assert_not_in_success_response([sign_up_now, buy_premium], result) + self.assert_not_in_success_response([sign_up_now, buy_standard], result) - realm.plan_type = Realm.PREMIUM + realm.plan_type = Realm.STANDARD realm.save(update_fields=["plan_type"]) result = self.client_get("/plans/", subdomain="zulip") self.assert_in_success_response([current_plan], result) - self.assert_not_in_success_response([sign_up_now, buy_premium], result) + self.assert_not_in_success_response([sign_up_now, buy_standard], result) diff --git a/zerver/tests/test_home.py b/zerver/tests/test_home.py index 12bb4edc9d..8626887240 100644 --- a/zerver/tests/test_home.py +++ b/zerver/tests/test_home.py @@ -672,13 +672,13 @@ class HomeTest(ZulipTestCase): result_html = self._get_home_page().content.decode('utf-8') self.assertIn('Plans', result_html) - # Show plans link to no one, including admins, if SELF_HOSTED or PREMIUM + # Show plans link to no one, including admins, if SELF_HOSTED or STANDARD realm.plan_type = Realm.SELF_HOSTED realm.save(update_fields=["plan_type"]) result_html = self._get_home_page().content.decode('utf-8') self.assertNotIn('Plans', result_html) - realm.plan_type = Realm.PREMIUM + realm.plan_type = Realm.STANDARD realm.save(update_fields=["plan_type"]) result_html = self._get_home_page().content.decode('utf-8') self.assertNotIn('Plans', result_html) diff --git a/zerver/tests/test_import_export.py b/zerver/tests/test_import_export.py index 26d2f215fd..b880f9c6e0 100644 --- a/zerver/tests/test_import_export.py +++ b/zerver/tests/test_import_export.py @@ -824,7 +824,7 @@ class ImportExportTest(ZulipTestCase): def test_plan_type(self) -> None: realm = get_realm('zulip') - realm.plan_type = Realm.PREMIUM + realm.plan_type = Realm.STANDARD realm.save(update_fields=['plan_type']) self._setup_export_files() diff --git a/zerver/tests/test_realm.py b/zerver/tests/test_realm.py index 524bee4610..d86f1b067f 100644 --- a/zerver/tests/test_realm.py +++ b/zerver/tests/test_realm.py @@ -351,12 +351,12 @@ class RealmTest(ZulipTestCase): def test_change_plan_type(self) -> None: user = self.example_user('iago') self.assertEqual(get_realm('zulip').max_invites, settings.INVITES_DEFAULT_REALM_DAILY_MAX) - do_change_plan_type(user, Realm.PREMIUM) - self.assertEqual(get_realm('zulip').max_invites, Realm.INVITES_PREMIUM_REALM_DAILY_MAX) + do_change_plan_type(user, Realm.STANDARD) + self.assertEqual(get_realm('zulip').max_invites, Realm.INVITES_STANDARD_REALM_DAILY_MAX) do_change_plan_type(user, Realm.LIMITED) self.assertEqual(get_realm('zulip').max_invites, settings.INVITES_DEFAULT_REALM_DAILY_MAX) - do_change_plan_type(user, Realm.PREMIUM_FREE) - self.assertEqual(get_realm('zulip').max_invites, Realm.INVITES_PREMIUM_REALM_DAILY_MAX) + do_change_plan_type(user, Realm.STANDARD_FREE) + self.assertEqual(get_realm('zulip').max_invites, Realm.INVITES_STANDARD_REALM_DAILY_MAX) class RealmAPITest(ZulipTestCase):