hide raw resources ui if disabled

This commit is contained in:
miloschwartz 2025-06-17 16:23:33 -04:00
parent 21e9edd201
commit 32e54d0f94
No known key found for this signature in database
2 changed files with 10 additions and 2 deletions

View file

@ -166,6 +166,14 @@ export async function createResource(
{ siteId, orgId }
);
} else {
if (!config.getRawConfig().flags?.allow_raw_resources) {
return next(
createHttpError(
HttpCode.BAD_REQUEST,
"Raw resources are not allowed"
)
);
}
return await createRawResource(
{ req, res, next },
{ siteId, orgId }