fix(datatables): say (EE) on the entries a license disables

A greyed-out 'Permissions' only tells the reader that they cannot click it.
Suffix it the way the sidebar already marks its enterprise entries, so the
reason is on the row itself rather than only in the tooltip.
This commit is contained in:
Diego Imbert
2026-09-01 18:05:07 +02:00
parent fa4c06658f
commit 8a949471d0
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -134,6 +134,8 @@
/** Shown on the entries the server refuses to plan without a license. */
const EE_PERMISSIONS_TOOLTIP = 'Data table permissions require an Enterprise license'
/** A disabled entry has to say why it is disabled, not just that it is. */
const eeSuffixed = (name: string) => name + ($enterpriseLicense ? '' : ' (EE)')
const sameTable = (a: SelectedTable, b: SelectedTable) =>
a.datatable === b.datatable && a.schema === b.schema && a.table === b.table
@@ -694,7 +696,7 @@
...(canManageDatatable
? [
{
displayName: 'Roles',
displayName: eeSuffixed('Roles'),
icon: KeyRoundIcon,
disabled: !$enterpriseLicense,
tooltip: EE_PERMISSIONS_TOOLTIP,
@@ -754,7 +756,7 @@
...(canManage(root.datatable, sc.schemaKey)
? [
{
displayName: 'Permissions',
displayName: eeSuffixed('Permissions'),
icon: KeyRoundIcon,
disabled: !$enterpriseLicense,
tooltip: EE_PERMISSIONS_TOOLTIP,
@@ -842,7 +844,7 @@
...(canManage(root.datatable, sc.schemaKey, tableKey)
? [
{
displayName: 'Permissions',
displayName: eeSuffixed('Permissions'),
icon: KeyRoundIcon,
disabled: !$enterpriseLicense,
tooltip: EE_PERMISSIONS_TOOLTIP,
@@ -470,7 +470,7 @@
action: () => migrationsButtons[dataTable.name]?.open()
},
{
displayName: 'Permissions',
displayName: 'Permissions' + ($enterpriseLicense ? '' : ' (EE)'),
icon: KeyRound,
// The server refuses to plan a permissions change without a
// license, so the entry says so rather than failing later.