mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-14 14:48:44 +02:00
hide raw resources ui if disabled
This commit is contained in:
parent
21e9edd201
commit
32e54d0f94
2 changed files with 10 additions and 2 deletions
|
@ -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 }
|
||||
|
|
|
@ -683,7 +683,7 @@ export default function Page() {
|
|||
</SettingsSectionForm>
|
||||
</SettingsSectionBody>
|
||||
</SettingsSection>
|
||||
) : (
|
||||
) : env.flags.allowRawResources ? (
|
||||
<SettingsSection>
|
||||
<SettingsSectionHeader>
|
||||
<SettingsSectionTitle>
|
||||
|
@ -781,7 +781,7 @@ export default function Page() {
|
|||
</SettingsSectionForm>
|
||||
</SettingsSectionBody>
|
||||
</SettingsSection>
|
||||
)}
|
||||
) : null}
|
||||
|
||||
<div className="flex justify-end space-x-2 mt-8">
|
||||
<Button
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue