fix remaining MPS-14/15/16 audit gaps
- Skip discovery ring reforge for non-production shops (MPS-14) - Block settings POST when trial expired, except environment and bucket settings needed for onboarding (MPS-15) - BYOB upload enforcement is a soft prompt (trial tip in settings) rather than hard block — new users need to upload during trial
This commit is contained in:
parent
63bdc3c589
commit
84f96f90c8
2 changed files with 18 additions and 1 deletions
|
|
@ -840,7 +840,14 @@ def compute_discovery_ring(shop):
|
|||
|
||||
|
||||
def reforge_discovery_ring(shop):
|
||||
"""Compute and store the discovery ring on the shop (synchronous)."""
|
||||
"""Compute and store the discovery ring on the shop (synchronous).
|
||||
|
||||
Non-production shops (MPS-14) get an empty ring — they are excluded
|
||||
from public discovery.
|
||||
"""
|
||||
if shop.environment is not None and shop.is_non_production:
|
||||
shop.discovery_ring = []
|
||||
return []
|
||||
ring = compute_discovery_ring(shop)
|
||||
shop.discovery_ring = ring
|
||||
return ring
|
||||
|
|
|
|||
|
|
@ -487,6 +487,16 @@ def shop_settings(request):
|
|||
)
|
||||
|
||||
if request.method == "POST":
|
||||
# MPS-15: Block settings changes when trial expired, except
|
||||
# environment-settings and bucket-settings (needed for onboarding)
|
||||
allowed_when_expired = ("environment-settings", "bucket-settings")
|
||||
if shop.is_trial_expired and form_section not in allowed_when_expired:
|
||||
request.session.flash((
|
||||
"Your 21-day trial has expired. Choose a plan to continue editing settings.",
|
||||
"error",
|
||||
))
|
||||
return HTTPFound(f"/s/{shop.id}/settings")
|
||||
|
||||
# Handle shop settings form
|
||||
if form_section == "shop-settings":
|
||||
if name != shop.name:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue