migrate to dataloader for batch permissions fetching

Signed-off-by: aramissennyeydd <aramis.sennyey@doordash.com>
This commit is contained in:
aramissennyeydd
2026-03-11 09:42:56 -04:00
committed by Patrik Oldsberg
parent ce97558e11
commit 10f8fa1df8
4 changed files with 33 additions and 12 deletions
+13
View File
@@ -426,6 +426,17 @@ const RestrictedCard = PermissionExampleCardBlueprint.make({
if: { permissions: { $contains: 'catalog.entity.create' } },
});
// Feature flag-gated card — only instantiated when the user has
// the experimental-card FF enabled.
const FeatureFlagCard = PermissionExampleCardBlueprint.make({
name: 'feature-flag',
params: {
title: 'Feature Flagged Card',
description: 'Visible only with the experimental-card FF active.',
},
if: { featureFlags: { $contains: 'experimental-card' } },
});
// Example: Page enabled only when the user is allowed to create catalog entities.
//
// The `if` predicate is evaluated once at app startup (after sign-in),
@@ -479,6 +490,7 @@ export const pagesPlugin = createFrontendPlugin({
{ name: 'experimental-features' },
{ name: 'advanced-features' },
{ name: 'beta-access' },
{ name: 'experimental-card' },
],
extensions: [
IndexPage,
@@ -491,5 +503,6 @@ export const pagesPlugin = createFrontendPlugin({
PublicCard,
RestrictedCard,
PermissionGatedPage,
FeatureFlagCard,
],
});