This message was deleted.
# extensions
a
This message was deleted.
s
The Extension button in the side nav should only be shown to users with permissions very similar to admins
or at least, to users who have permission to do everything in the extension pages. specifically edit settings and feature flags. on the helm side edit apps, add repos and update helm operations
f
I meant I created an extension and want to choose roles, which can see my custom pages and button in sidebar(I added button via
virtualType
)
s
for products and virtual types there are a few properties you can add to determine if they're visibile
Copy code
//   ifHave,                  -- Show this product only if the given capability is available
//   ifHaveGroup,             -- Show this product only if the given group exists in the store [inStore]
//   ifHaveType,              -- Show this product only if the given type exists in the store [inStore], This can also be specified as an object { type: TYPE, store: 'management' } if the type isn't in the current [inStore]
//   ifHaveVerb,              -- In combination with ifHaveTYpe, show it only if the type also has this collectionMethod
unfortunately I don't think we have one for role/s, but there is ifHaveType & ifHaveVerv for singular resource types
f
I don't know how it's made in Longhorn, but button shows dynamically, I know that Longhorn isn't extension
s
Longhorn uses the same mechanism under the hood
Copy code
product({
    ifHaveGroup: '<http://longhorn.io|longhorn.io>',
    icon:        'longhorn'
  });
They use the ifHaveGroup. If a user can see any resource in that group the button will be visible
1
f
Thanks!