mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-13 07:30:57 +00:00
add subscribed check back
This commit is contained in:
@@ -333,23 +333,16 @@ export async function validateOidcCallback(
|
|||||||
.innerJoin(orgs, eq(orgs.orgId, idpOrg.orgId));
|
.innerJoin(orgs, eq(orgs.orgId, idpOrg.orgId));
|
||||||
allOrgs = idpOrgs.map((o) => o.orgs);
|
allOrgs = idpOrgs.map((o) => o.orgs);
|
||||||
|
|
||||||
// for (const org of allOrgs) {
|
for (const org of allOrgs) {
|
||||||
// const subscribed = await isSubscribed(
|
const subscribed = await isSubscribed(
|
||||||
// org.orgId,
|
org.orgId,
|
||||||
// tierMatrix.autoProvisioning
|
tierMatrix.autoProvisioning
|
||||||
// );
|
);
|
||||||
// if (!subscribed) {
|
if (!subscribed) {
|
||||||
// // filter out the org
|
// filter out the org
|
||||||
// allOrgs = allOrgs.filter((o) => o.orgId !== org.orgId);
|
allOrgs = allOrgs.filter((o) => o.orgId !== org.orgId);
|
||||||
|
}
|
||||||
// // return next(
|
}
|
||||||
// // createHttpError(
|
|
||||||
// // HttpCode.FORBIDDEN,
|
|
||||||
// // "This organization's current plan does not support this feature."
|
|
||||||
// // )
|
|
||||||
// // );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
} else {
|
} else {
|
||||||
allOrgs = await db.select().from(orgs);
|
allOrgs = await db.select().from(orgs);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user