🛂 gate label endpoints behing subscription

This commit is contained in:
Fred KISSIE
2026-05-14 21:17:58 +02:00
parent 173562654b
commit 9a88394efe
2 changed files with 6 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ export function verifyValidSubscription(tiers: Tier[]) {
next: NextFunction next: NextFunction
): Promise<any> { ): Promise<any> {
try { try {
if (build != "saas") { if (build !== "saas") {
return next(); return next();
} }

View File

@@ -737,6 +737,7 @@ authenticated.get(
"/org/:orgId/labels", "/org/:orgId/labels",
verifyValidLicense, verifyValidLicense,
verifyOrgAccess, verifyOrgAccess,
verifyValidSubscription(tierMatrix.labels),
verifyUserHasAction(ActionsEnum.listOrgLabels), verifyUserHasAction(ActionsEnum.listOrgLabels),
labels.listOrgLabels labels.listOrgLabels
); );
@@ -745,6 +746,7 @@ authenticated.post(
"/org/:orgId/labels", "/org/:orgId/labels",
verifyValidLicense, verifyValidLicense,
verifyOrgAccess, verifyOrgAccess,
verifyValidSubscription(tierMatrix.labels),
verifyUserHasAction(ActionsEnum.createOrgLabel), verifyUserHasAction(ActionsEnum.createOrgLabel),
labels.createOrgLabel labels.createOrgLabel
); );
@@ -753,6 +755,7 @@ authenticated.patch(
"/org/:orgId/label/:labelId", "/org/:orgId/label/:labelId",
verifyValidLicense, verifyValidLicense,
verifyOrgAccess, verifyOrgAccess,
verifyValidSubscription(tierMatrix.labels),
verifyUserHasAction(ActionsEnum.updateOrgLabel), verifyUserHasAction(ActionsEnum.updateOrgLabel),
labels.updateOrgLabel labels.updateOrgLabel
); );
@@ -769,6 +772,7 @@ authenticated.put(
"/org/:orgId/label/:labelId/attach", "/org/:orgId/label/:labelId/attach",
verifyValidLicense, verifyValidLicense,
verifyOrgAccess, verifyOrgAccess,
verifyValidSubscription(tierMatrix.labels),
verifyUserHasAction(ActionsEnum.attachLabelToItem), verifyUserHasAction(ActionsEnum.attachLabelToItem),
labels.attachLabelToItem labels.attachLabelToItem
); );
@@ -777,6 +781,7 @@ authenticated.put(
"/org/:orgId/label/:labelId/detach", "/org/:orgId/label/:labelId/detach",
verifyValidLicense, verifyValidLicense,
verifyOrgAccess, verifyOrgAccess,
verifyValidSubscription(tierMatrix.labels),
verifyUserHasAction(ActionsEnum.detachLabelFromItem), verifyUserHasAction(ActionsEnum.detachLabelFromItem),
labels.detachLabelFromItem labels.detachLabelFromItem
); );