Hide edit tools for non-admin users

This commit is contained in:
Pierre HUBERT 2023-07-09 17:42:08 +02:00
parent 014c2625f9
commit 6cd9b29178

View File

@ -118,8 +118,10 @@ function UsersTable(p: {
type: "boolean",
editable: family.family.is_admin,
},
];
{
if (family.family.is_admin)
columns.push({
field: "actions",
type: "actions",
headerName: "Actions",
@ -166,8 +168,7 @@ function UsersTable(p: {
/>,
];
},
},
];
});
return (
<DataGrid