mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Delete membership by email
This commit is contained in:
@@ -59,8 +59,8 @@ const ProjectUsersTable = ({ userData, changeData, myUser, filter, isUserListLoa
|
|||||||
const workspaceId = router.query.id as string;
|
const workspaceId = router.query.id as string;
|
||||||
// Delete the row in the table (e.g. a user)
|
// Delete the row in the table (e.g. a user)
|
||||||
// #TODO: Add a pop-up that warns you that the user is going to be deleted.
|
// #TODO: Add a pop-up that warns you that the user is going to be deleted.
|
||||||
const handleDelete = async (membershipId: string) => {
|
const handleDelete = async (email: string) => {
|
||||||
await deleteUserFromWorkspaceMutateAsync({ membershipId, workspaceId });
|
await deleteUserFromWorkspaceMutateAsync({ emails: [email], workspaceId });
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleRoleUpdate = async (index: number, e: string) => {
|
const handleRoleUpdate = async (index: number, e: string) => {
|
||||||
@@ -368,7 +368,7 @@ const ProjectUsersTable = ({ userData, changeData, myUser, filter, isUserListLoa
|
|||||||
myRole !== "member" ? (
|
myRole !== "member" ? (
|
||||||
<div className="mt-0.5 flex items-center opacity-50 hover:opacity-100">
|
<div className="mt-0.5 flex items-center opacity-50 hover:opacity-100">
|
||||||
<Button
|
<Button
|
||||||
onButtonPressed={() => handleDelete(row.membershipId)}
|
onButtonPressed={() => handleDelete(row.email)}
|
||||||
color="red"
|
color="red"
|
||||||
size="icon-sm"
|
size="icon-sm"
|
||||||
icon={faX}
|
icon={faX}
|
||||||
|
|||||||
Reference in New Issue
Block a user