PrivilegesHead() — supabase Function Reference
Architecture documentation for the PrivilegesHead() function in PrivilegesHead.tsx from the supabase codebase.
Entity Profile
Relationship Graph
Source Code
apps/studio/components/interfaces/Database/Privileges/PrivilegesHead.tsx lines 29–78
const PrivilegesHead = ({
disabled,
selectedSchema,
onChangeSchema,
selectedRole,
roles,
onChangeRole,
selectedTable,
tables,
onChangeTable,
hasChanges = false,
resetChanges,
applyChanges,
isApplyingChanges = false,
}: PrivilegesHeadProps) => {
return (
<div className="flex items-center justify-between">
<div className="flex items-center gap-x-2">
<SchemaSelector
className="bg-control rounded-md w-[180px] [&>button]:py-[5px]"
selectedSchemaName={selectedSchema}
onSelectSchema={onChangeSchema}
/>
<TablesSelect selectedTable={selectedTable} tables={tables} onChangeTable={onChangeTable} />
<div className="h-[20px] w-px border-r border-scale-600"></div>
<RolesSelect selectedRole={selectedRole} roles={roles} onChangeRole={onChangeRole} />
</div>
<div className="flex items-center gap-2">
<Button
type="default"
size="tiny"
onClick={resetChanges}
disabled={!hasChanges || isApplyingChanges}
>
Reset
</Button>
<Button
type="primary"
size="tiny"
onClick={applyChanges}
disabled={disabled || !hasChanges || isApplyingChanges}
loading={isApplyingChanges}
>
Apply Changes
</Button>
</div>
</div>
)
}
Domain
Subdomains
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free