Tenant paywalls
Ticket(s) / Related Merge Requests
minds#4669 (closed) front#6149 (closed) minds#4670 (closed)
Summary of Changes
- Abilility to purchase memberships
- Ability to paywall a post
- Ability to unlock a paywalled post
Testing Considerations
Tenant network: https://mortynet.kramnorth.com/
You will need to use the root
admin user to add and remove memberships.
Logged in:
-
/memberships
route redirects when a tenant network has no memberships. -
On the first membership creation, the memberships option appears in the sidebar. -
When the last membership, is archived, the memberships option disappears from the sidebar. -
Test multiple cards display properly on the membership tab in UI (subtle deviations from design here have been agreed with @mwrobs) -
I can buy a recurring membership, after doing so I see a manage plan option. -
I can buy a one-time membership, after doing so I see a purchased button with no manage plan (as there is nothing to cancel). -
On manage plan click, I can cancel a plan. -
On re-clicking to manage plan after cancellation, an error will be shown via a toaster. -
Create a post with a membership attached -
Create a title for the post -
Upload a thumbnail for the post -
The post from a new owner or non admin should be locked -
Purchase a membership and the post should be unlocked
Logged out:
-
On login from clicking a purchase button, i am navigated to buy the membership I clicked, if I do not already have it. -
On login from clicking a purchase button, i am NOT navigated to buy the membership I clicked, if I DO already have it. -
On register from clicking a purchase button, i am navigated to buy following onboarding.
Deployment Considerations
Apply the following schemas:
CREATE TABLE IF NOT EXISTS minds_site_membership_entities (
tenant_id int,
entity_guid bigint,
membership_guid bigint,
created_timestamp timestamp DEFAULT CURRENT_TIMESTAMP(),
PRIMARY KEY (tenant_id, entity_guid, membership_guid)
);
ALTER TABLE minds_entities_activity
ADD COLUMN site_membership boolean DEFAULT FALSE
AFTER attachments;
ALTER TABLE minds_entities_activity
ADD COLUMN paywall_thumbnail boolean DEFAULT FALSE
AFTER site_membership;
ALTER TABLE minds_entities_activity
ADD COLUMN link_title text DEFAULT null
AFTER paywall_thumbnail;
CREATE TABLE IF NOT EXISTS minds_payments_config(
tenant_id INT NOT NULL PRIMARY KEY,
stripe_customer_portal_config_id varchar(256) DEFAULT NULL
);
ALTER TABLE minds_entities_object_image ADD COLUMN blurhash text AFTER filename;
ALTER TABLE minds_entities_activity
MODIFY COLUMN paywall_thumbnail JSON DEFAULT NULL;
Regression Scope
Composer related
Platform Affected (web, mobile, etc)
Web
Developer Testing Completed
Screenshots / Screen Recording
Does this impact
-
Localization -
Dark/light mode -
Guest mode
Definition of Done Checklist
-
The Acceptance Criteria has been met -
Code is tested: Testing includes unit/spec, E2E/automated and manual testing -
Merge requests description has been filled out