Conversation
| )} | ||
| </Alert> | ||
| )} | ||
| <LinkButton |
There was a problem hiding this comment.
sorry, forgot to add the caveat yesterday that for sponsored and enterprise orgs, users without billing perms do not have access to the subscription page
since this lives in gsApp you could access subscription through useSubscription, then just render the previous alert you had when !hasBillingPerms && !subscription.canSelfServe
alternatively you could keep this as is, and any non-billing members on sponsored/enterprise orgs that click Try Out Seer Now will just get the insufficient access screen:

will leave to your discretion what you think the best experience is 🙏🏽
There was a problem hiding this comment.
we'll put the subscrition check in. it should be in all places that link out like that.
There was a problem hiding this comment.
yup! as far as i’m aware this is the only new place that links the subscription settings.
for future i’m pushing for ways to make this behavior more consistent across the product and easier for product engineers to use without needing much input from the billing team nor even much billing context (starting with hooks like useProductBillingAccess and expanding from there).
until then, thanks for bearing with all my comments! 🙏🏽
There was a problem hiding this comment.
issues is the other place: https://github.com/getsentry/sentry/pull/104679/changes
There was a problem hiding this comment.
gah, found a function hasAccessToSubscriptionOverview() thats almost perfect to use. but the return from useSubscription() is nullable so it's not a clean plug-in :(
There was a problem hiding this comment.
only 2 callsites though, so fixed up the helper 👍
|
|
||
| export function hasAccessToSubscriptionOverview( | ||
| subscription: Subscription, | ||
| subscription: Subscription | null, |
There was a problem hiding this comment.
this makes it easy to push the return of useSubscription() into the check.
No description provided.