mirror of
https://github.com/fosrl/pangolin.git
synced 2026-04-26 07:52:24 +00:00
Compare commits
2 Commits
9ef93df54f
...
316b7e5653
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
316b7e5653 | ||
|
|
00fc1da33c |
@@ -35,6 +35,12 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p align="center">
|
||||||
|
<a href="https://docs.pangolin.net/careers/join-us">
|
||||||
|
<img src="https://img.shields.io/badge/🚀_We're_Hiring!-Join_Our_Team-brightgreen?style=for-the-badge" alt="We're Hiring!" />
|
||||||
|
</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<strong>
|
<strong>
|
||||||
Start testing Pangolin at <a href="https://app.pangolin.net/auth/signup">app.pangolin.net</a>
|
Start testing Pangolin at <a href="https://app.pangolin.net/auth/signup">app.pangolin.net</a>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { fromError } from "zod-validation-error";
|
|||||||
import { OpenAPITags, registry } from "@server/openApi";
|
import { OpenAPITags, registry } from "@server/openApi";
|
||||||
import { getUserDeviceName } from "@server/db/names";
|
import { getUserDeviceName } from "@server/db/names";
|
||||||
import { build } from "@server/build";
|
import { build } from "@server/build";
|
||||||
|
import { isLicensedOrSubscribed } from "@server/lib/isLicencedOrSubscribed";
|
||||||
|
|
||||||
const getClientSchema = z.strictObject({
|
const getClientSchema = z.strictObject({
|
||||||
clientId: z
|
clientId: z
|
||||||
@@ -250,12 +251,18 @@ export async function getClient(
|
|||||||
: null;
|
: null;
|
||||||
|
|
||||||
// Build posture data if available (platform-specific)
|
// Build posture data if available (platform-specific)
|
||||||
|
// Only return posture data if org is licensed/subscribed
|
||||||
let postureData: PostureData | null = null;
|
let postureData: PostureData | null = null;
|
||||||
if (build !== "oss") {
|
if (build !== "oss") {
|
||||||
postureData = getPlatformPostureData(
|
const isOrgLicensed = await isLicensedOrSubscribed(
|
||||||
client.currentFingerprint?.platform || null,
|
client.clients.orgId
|
||||||
client.currentFingerprint
|
|
||||||
);
|
);
|
||||||
|
if (isOrgLicensed) {
|
||||||
|
postureData = getPlatformPostureData(
|
||||||
|
client.currentFingerprint?.platform || null,
|
||||||
|
client.currentFingerprint
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const data: GetClientResponse = {
|
const data: GetClientResponse = {
|
||||||
|
|||||||
Reference in New Issue
Block a user