mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-04 09:46:40 +00:00
hide raw resources ui if disabled
This commit is contained in:
@@ -166,6 +166,14 @@ export async function createResource(
|
|||||||
{ siteId, orgId }
|
{ siteId, orgId }
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
if (!config.getRawConfig().flags?.allow_raw_resources) {
|
||||||
|
return next(
|
||||||
|
createHttpError(
|
||||||
|
HttpCode.BAD_REQUEST,
|
||||||
|
"Raw resources are not allowed"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
return await createRawResource(
|
return await createRawResource(
|
||||||
{ req, res, next },
|
{ req, res, next },
|
||||||
{ siteId, orgId }
|
{ siteId, orgId }
|
||||||
|
|||||||
@@ -683,7 +683,7 @@ export default function Page() {
|
|||||||
</SettingsSectionForm>
|
</SettingsSectionForm>
|
||||||
</SettingsSectionBody>
|
</SettingsSectionBody>
|
||||||
</SettingsSection>
|
</SettingsSection>
|
||||||
) : (
|
) : env.flags.allowRawResources ? (
|
||||||
<SettingsSection>
|
<SettingsSection>
|
||||||
<SettingsSectionHeader>
|
<SettingsSectionHeader>
|
||||||
<SettingsSectionTitle>
|
<SettingsSectionTitle>
|
||||||
@@ -781,7 +781,7 @@ export default function Page() {
|
|||||||
</SettingsSectionForm>
|
</SettingsSectionForm>
|
||||||
</SettingsSectionBody>
|
</SettingsSectionBody>
|
||||||
</SettingsSection>
|
</SettingsSection>
|
||||||
)}
|
) : null}
|
||||||
|
|
||||||
<div className="flex justify-end space-x-2 mt-8">
|
<div className="flex justify-end space-x-2 mt-8">
|
||||||
<Button
|
<Button
|
||||||
|
|||||||
Reference in New Issue
Block a user