@growth-operations/ui-shared 1.6.7 → 1.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -362,11 +362,16 @@ function CompedBilling() {
|
|
|
362
362
|
|
|
363
363
|
export function BillingTab({ context, state, appKey, openIframe = null }) {
|
|
364
364
|
const mode = state?.entitlement?.mode;
|
|
365
|
+
const isSuperAdmin = state?.user?.is_super_admin === true;
|
|
365
366
|
|
|
366
367
|
return (
|
|
367
368
|
<Flex direction="column" gap="medium">
|
|
368
369
|
<Heading>Billing</Heading>
|
|
369
|
-
{
|
|
370
|
+
{!isSuperAdmin ? (
|
|
371
|
+
<Alert variant="warning" title="Access restricted">
|
|
372
|
+
<Text>Billing settings are only available to super admins.</Text>
|
|
373
|
+
</Alert>
|
|
374
|
+
) : mode === "legacy" ? (
|
|
370
375
|
<LegacyBilling state={state} />
|
|
371
376
|
) : mode === "credits" ? (
|
|
372
377
|
<CreditsBilling context={context} state={state} appKey={appKey} openIframe={openIframe} />
|