create-mercato-app 0.6.3-develop.3851.1.642df0a016 → 0.6.3-develop.3857.1.da89d7530c

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mercato-app",
3
- "version": "0.6.3-develop.3851.1.642df0a016",
3
+ "version": "0.6.3-develop.3857.1.da89d7530c",
4
4
  "type": "module",
5
5
  "description": "Create a new Open Mercato application",
6
6
  "main": "./dist/index.js",
@@ -5,6 +5,7 @@ import { getAuthFromCookies } from '@open-mercato/shared/lib/auth/server'
5
5
  import { AppShell } from '@open-mercato/ui/backend/AppShell'
6
6
  import { resolveTranslations } from '@open-mercato/shared/lib/i18n/server'
7
7
  import { I18nProvider } from '@open-mercato/shared/lib/i18n/context'
8
+ import { hasAllFeatures } from '@open-mercato/shared/lib/auth/featureMatch'
8
9
  import { profilePathPrefixes } from '@open-mercato/core/modules/auth/lib/profile-sections'
9
10
  import { APP_VERSION } from '@open-mercato/shared/lib/version'
10
11
  import { parseBooleanWithDefault } from '@open-mercato/shared/lib/boolean'
@@ -82,6 +83,11 @@ export default async function BackendLayout({
82
83
  const initialCollapsed = collapsedCookie === '1'
83
84
  const demoModeEnabled = parseBooleanWithDefault(process.env.DEMO_MODE, true)
84
85
  const deployEnv = process.env.DEPLOY_ENV
86
+ const grantedFeatures = Array.isArray(auth?.features)
87
+ ? auth.features.filter((feature): feature is string => typeof feature === 'string')
88
+ : []
89
+ const canManageUpgradeActions =
90
+ auth?.isSuperAdmin === true || hasAllFeatures(['configs.manage'], grantedFeatures)
85
91
  const baseProductName = translate('appShell.productName', 'Open Mercato')
86
92
  const productName = deployEnv && deployEnv !== 'local'
87
93
  ? `${baseProductName} (${deployEnv.charAt(0).toUpperCase() + deployEnv.slice(1)})`
@@ -99,6 +105,7 @@ export default async function BackendLayout({
99
105
  <AppShell
100
106
  productName={productName}
101
107
  email={auth?.email}
108
+ canManageUpgradeActions={canManageUpgradeActions}
102
109
  groups={[]}
103
110
  currentTitle={currentTitle}
104
111
  breadcrumb={breadcrumb}