-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(clerk-js,types): Add protect to billing components #3179
feat(clerk-js,types): Add protect to billing components #3179
Conversation
|
@@ -17,6 +17,7 @@ type BillingProviderValue = { | |||
currentPage: BillingPages; | |||
goToPlanAndBilling: () => void; | |||
goToManageBillingPlan: () => void; | |||
checkPermissions?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
@@ -17,6 +17,7 @@ type BillingProviderValue = { | |||
currentPage: BillingPages; | |||
goToPlanAndBilling: () => void; | |||
goToManageBillingPlan: () => void; | |||
checkPermissions?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I imagine that this is needed to us to support Billing inside the UserProfile where permissions do not exist, right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct @panteliselef
{checkPermissions ? ( | ||
<Protect permission='org:sys_billing:manage'> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe using useProtect
makes more sense now that we have checkPermissions
* feat(clerk-js,types): Add protect to billing components * fix(clerk-js): Check permissions only in organization billing
Description
In this pr we are adding protect to billing components
⚠️ merge this pr after fapi/dapi introduce
org:sys_billing:read
&org:sys_billing:read
Checklist
npm test
runs as expected.npm run build
runs as expected.Type of change