Skip to content

Support arbitrary, temporary Entitlement grants#680

Open
allanlasser wants to merge 9 commits into
masterfrom
allanlasser/issue666
Open

Support arbitrary, temporary Entitlement grants#680
allanlasser wants to merge 9 commits into
masterfrom
allanlasser/issue666

Conversation

@allanlasser
Copy link
Copy Markdown
Member

Fixes #666

Adds a new EntitlementGrant model that lets us give Entitlements to Organizations.

Previously, the only way to associate Entitlements with Organizations was through a Subscription to a Plan.

This allows us to grant access to resources in an arbitrary way to any org, and revoke them as needed, too.

This uses our same code path for refreshing entitlements on a monthly cadence.

This also updates our serializer to union entitlements, which will come in handy when we support multiple concurrent subscriptions.

@allanlasser allanlasser temporarily deployed to squarelet-pi-allanlasse-snttlh May 19, 2026 19:57 Inactive
@allanlasser allanlasser temporarily deployed to squarelet-pi-allanlasse-snttlh May 19, 2026 20:04 Inactive
Copy link
Copy Markdown
Member

@mitchelljkotler mitchelljkotler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created another PR with SQL optimizations

Comment thread squarelet/organizations/models/payment.py
Comment thread squarelet/organizations/models/payment.py Outdated
Comment thread squarelet/organizations/models/payment.py Outdated
Comment thread squarelet/organizations/models/payment.py Outdated
Comment thread squarelet/organizations/querysets.py Outdated
@allanlasser
Copy link
Copy Markdown
Member Author

@mitchelljkotler I've addressed your feedback and incorporated your fixes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support arbitrary, temporary Entitlement grants

2 participants