Compare commits

...

5 Commits

Author SHA1 Message Date
Owen Schwartz
9b71c426c7 Merge pull request #3005 from fosrl/dev
1.18.2-s.4
2026-05-05 12:12:09 -07:00
miloschwartz
e06dda27cb dont wait rebuild 2026-05-05 12:10:55 -07:00
miloschwartz
18f6e0f75d add subscribed check back 2026-05-05 11:52:31 -07:00
miloschwartz
3b232bcc58 set orgId to undefined 2026-05-05 11:31:58 -07:00
Owen
c575bb76e7 Fix only using acme.json in dir
Ref #2978
2026-05-05 11:11:43 -07:00
3 changed files with 43 additions and 20 deletions

View File

@@ -500,7 +500,30 @@ function findAcmeJsonFiles(dirPath: string): string[] {
const fullPath = path.join(dirPath, entry.name); const fullPath = path.join(dirPath, entry.name);
if (entry.isDirectory()) { if (entry.isDirectory()) {
results.push(...findAcmeJsonFiles(fullPath)); results.push(...findAcmeJsonFiles(fullPath));
} else if (entry.isFile() && entry.name === "acme.json") { } else if (entry.isFile()) {
// check if it is a json file
if (entry.name.endsWith(".json")) {
let raw: string;
try {
raw = fs.readFileSync(fullPath, "utf8");
} catch (err) {
logger.warn(
`acmeCertSync: could not read file "${fullPath}": ${err}`
);
continue;
}
let parsed: any;
try {
parsed = JSON.parse(raw);
} catch (err) {
logger.warn(
`acmeCertSync: could not parse "${fullPath}" as JSON: ${err}`
);
continue;
}
}
results.push(fullPath); results.push(fullPath);
} }
} }

View File

@@ -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);
} }
@@ -490,7 +483,14 @@ export async function validateOidcCallback(
} }
} }
await calculateUserClientsForOrgs(existingUser.userId); calculateUserClientsForOrgs(existingUser.userId).catch(
(err) => {
logger.error(
"Error calculating user clients after removing all orgs for user with no valid IdP mappings",
{ error: err }
);
}
);
return next( return next(
createHttpError( createHttpError(

View File

@@ -147,7 +147,7 @@ export default function SmartLoginOrgSelector({
const response = await generateOidcUrlProxy( const response = await generateOidcUrlProxy(
idpId, idpId,
safeRedirect, safeRedirect,
orgId, undefined,
forceLogin forceLogin
); );