-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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: usage base billed - license key check - move to private api #15222
Conversation
…on-fe-ui' into feat/license-creation-fe-ui
…on-fe-ui' into feat/license-creation-fe-ui
…on-fe-ui' into feat/license-creation-fe-ui
Hey there and thank you for opening this pull request! 👋🏼 We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted. Details:
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
2 Skipped Deployments
|
@@ -1,9 +1,13 @@ | |||
import type { PrismaClient } from "@calcom/prisma"; | |||
|
|||
export async function getDeploymentKey(prisma: PrismaClient) { | |||
if (process.env.CALCOM_LICENSE_KEY) { |
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.
It makes more sense to early return here if its found in .env. Saves a redundant db call
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 think the DB is the preferred way to check/save the key. The env one is only for backwards compatibility. If a self hosted uses the wizard to set update the key, then it will never reach it unless it manually removes it from env. Although it makes sense to alert the user that it might have differing keys in the DB/env.
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 get this - but to set the license key in the wizard it needs to be set in the .env.
https://app.campsite.co/cal/posts/zxcq11vnt6tg#comment-l2toxbc9dr55
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.
Restores this to what it is in main (this is a based branch off the frontend changes for this api feature).
This file won't get used in newer self hosted instances. But will leave it here for now so we can track what happens with old self hosted instances.
3328c07
to
d059b73
Compare
This reverts commit d059b73.
@sean-brydon I need more context on |
Signed-off-by: zomars <zomars@me.com>
Hi zomars - i have DM'd you a bit more info but TLDR. Its use to ensure self hosters can only increase billing ƒor their instance when signature tokens match |
Not to be merged until private api has been deployed and migrations have been applied and we are ready to switch
More info here https://app.campsite.co/cal/posts/xdwtm9bcavqq