Skip to content

armgit / fider

Public Imported from GitHub
0

Open platform to collect and prioritize feedback

Indexing is a pro feature.

Matt Robertsf9abb16692c1
diff --git a/app/services/sqlstore/postgres/billing.go b/app/services/sqlstore/postgres/billing.go
index 583a855d7..f153e4910 100644
--- a/app/services/sqlstore/postgres/billing.go
+++ b/app/services/sqlstore/postgres/billing.go
@@ -20,7 +20,7 @@ func activateBillingSubscription(ctx context.Context, c *cmd.ActivateBillingSubs
return using(ctx, func(trx *dbx.Trx, _ *entity.Tenant, _ *entity.User) error {
_, err := trx.Execute(`
UPDATE tenants
- SET is_pro = true, status = $2
+ SET is_pro = true, status = $2, prevent_indexing = false
WHERE id = $1
`, c.TenantID, enum.TenantActive)
if err != nil {
@@ -35,7 +35,7 @@ func cancelBillingSubscription(ctx context.Context, c *cmd.CancelBillingSubscrip
return using(ctx, func(trx *dbx.Trx, _ *entity.Tenant, _ *entity.User) error {
_, err := trx.Execute(`
UPDATE tenants
- SET is_pro = false
+ SET is_pro = false, prevent_indexing = true
WHERE id = $1
`, c.TenantID)
if err != nil {
@@ -103,7 +103,7 @@ func activateStripeSubscription(ctx context.Context, c *cmd.ActivateStripeSubscr
_, err = trx.Execute(`
UPDATE tenants
- SET is_pro = true, status = $2
+ SET is_pro = true, status = $2, prevent_indexing = false
WHERE id = $1
`, c.TenantID, enum.TenantActive)
if err != nil {
@@ -127,7 +127,7 @@ func cancelStripeSubscription(ctx context.Context, c *cmd.CancelStripeSubscripti
_, err = trx.Execute(`
UPDATE tenants
- SET is_pro = false
+ SET is_pro = false, prevent_indexing = true
WHERE id = $1
`, c.TenantID)
if err != nil {
diff --git a/migrations/202602041200_enable_indexing_for_pro.sql b/migrations/202602041200_enable_indexing_for_pro.sql
new file mode 100644
index 000000000..4679a6bdf
--- /dev/null
+++ b/migrations/202602041200_enable_indexing_for_pro.sql
@@ -0,0 +1,4 @@
+-- Enable search engine indexing for all existing pro accounts
+UPDATE tenants
+SET prevent_indexing = false
+WHERE is_pro = true;
diff --git a/public/pages/Administration/pages/ManageBilling.page.tsx b/public/pages/Administration/pages/ManageBilling.page.tsx
index 7f3d60499..d3a5b53d4 100644
--- a/public/pages/Administration/pages/ManageBilling.page.tsx
+++ b/public/pages/Administration/pages/ManageBilling.page.tsx
@@ -140,7 +140,14 @@ const ManageBillingPage = (props: ManageBillingPageProps) => {
const freeFeatures = ["250 suggestions", "Unlimited voters", "Your own subdomain or custom domain", "All core functionality"]
- const proFeatures = ["Everything in free", "Unlimited suggestions", "Content moderation", "Billing month to month", "Responsive email support"]
+ const proFeatures = [
+ "Everything in free",
+ "Unlimited suggestions",
+ "Content moderation",
+ "Search engine indexing",
+ "Billing month to month",
+ "Responsive email support",
+ ]
const legacyProFeatures: PlanFeature[] = [
{ text: "Same features as Pro" },