diff --git a/mathesar_ui/src/i18n/languages/en/dict.json b/mathesar_ui/src/i18n/languages/en/dict.json index 4b9ad4e757..1f8afdcfe4 100644 --- a/mathesar_ui/src/i18n/languages/en/dict.json +++ b/mathesar_ui/src/i18n/languages/en/dict.json @@ -437,6 +437,9 @@ "passwords_do_not_match": "Passwords do not match", "paste_data_import": "Paste the data you want to import", "permission": "Permission", + "permissions_for_named_database": "Permissions for [databaseName] database", + "permissions_for_named_schema": "Permissions for [schemaName] schema", + "permissions_for_named_table": "Permissions for [tableName] table", "pick": "Pick", "pick_best_data_type_column": "Pick the best data type for each column", "pick_record": "Pick a record", diff --git a/mathesar_ui/src/pages/database/permissions/DatabasePermissionsModal.svelte b/mathesar_ui/src/pages/database/permissions/DatabasePermissionsModal.svelte index 215337f097..1796eb6422 100644 --- a/mathesar_ui/src/pages/database/permissions/DatabasePermissionsModal.svelte +++ b/mathesar_ui/src/pages/database/permissions/DatabasePermissionsModal.svelte @@ -6,6 +6,8 @@ DatabasePrivilege, RawDatabasePrivilegesForRole, } from '@mathesar/api/rpc/databases'; + import Identifier from '@mathesar/components/Identifier.svelte'; + import { RichText } from '@mathesar/components/rich-text'; import { DatabaseRouteContext } from '@mathesar/contexts/DatabaseRouteContext'; import type { Role } from '@mathesar/models/Role'; import AsyncRpcApiStore from '@mathesar/stores/AsyncRpcApiStore'; @@ -106,7 +108,11 @@ onClose={() => databasePrivileges.reset()} > - {$_('database_permissions')} + + {#if slotName === 'databaseName'} + {database.name} + {/if} + schemaPrivileges.reset()} > - {$_('schema_permissions')} + + {#if slotName === 'schemaName'} + {$schemaName} + {/if} + void; + export let openTablePermissionsModal: (_table: Table) => void; $: ({ currentRoleOwns, currentRolePrivileges } = table.currentAccess); @@ -148,6 +150,12 @@ > {$_('edit_table')} + openTablePermissionsModal(table)} + icon={iconPermissions} + > + {$_('table_permissions')} + {/if}
@@ -33,7 +41,13 @@ use:highlightNewItems={{ scrollHint: $_('table_new_items_scroll_hint') }} > {#each tables as table (table.oid)} - + {/each}
{:else} @@ -43,8 +57,15 @@ {/if} -{#if selectedTable} - +{#if tableForEditing} + +{/if} + +{#if tableForPermissions} + {/if}