Hide edit tools for non-admin users
This commit is contained in:
parent
014c2625f9
commit
6cd9b29178
@ -118,8 +118,10 @@ function UsersTable(p: {
|
|||||||
type: "boolean",
|
type: "boolean",
|
||||||
editable: family.family.is_admin,
|
editable: family.family.is_admin,
|
||||||
},
|
},
|
||||||
|
];
|
||||||
|
|
||||||
{
|
if (family.family.is_admin)
|
||||||
|
columns.push({
|
||||||
field: "actions",
|
field: "actions",
|
||||||
type: "actions",
|
type: "actions",
|
||||||
headerName: "Actions",
|
headerName: "Actions",
|
||||||
@ -166,8 +168,7 @@ function UsersTable(p: {
|
|||||||
/>,
|
/>,
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
},
|
});
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<DataGrid
|
<DataGrid
|
||||||
|
Loading…
Reference in New Issue
Block a user