mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-10 08:25:22 +02:00
refactor: update user and authentication schema with two-factor support
This commit is contained in:
@@ -52,7 +52,7 @@ interface Props {
|
||||
export const AddUserPermissions = ({ userId }: Props) => {
|
||||
const { data: projects } = api.project.all.useQuery();
|
||||
|
||||
const { data, refetch } = api.user.byUserId.useQuery(
|
||||
const { data, refetch } = api.auth.one.useQuery(
|
||||
{
|
||||
userId,
|
||||
},
|
||||
@@ -92,7 +92,7 @@ export const AddUserPermissions = ({ userId }: Props) => {
|
||||
|
||||
const onSubmit = async (data: AddPermissions) => {
|
||||
await mutateAsync({
|
||||
userId,
|
||||
id: userId,
|
||||
canCreateServices: data.canCreateServices,
|
||||
canCreateProjects: data.canCreateProjects,
|
||||
canDeleteServices: data.canDeleteServices,
|
||||
|
||||
@@ -104,9 +104,9 @@ export const ShowUsers = () => {
|
||||
</Badge>
|
||||
</TableCell>
|
||||
<TableCell className="text-center">
|
||||
{user.user.is2FAEnabled
|
||||
{/* {user.user.is2FAEnabled
|
||||
? "2FA Enabled"
|
||||
: "2FA Not Enabled"}
|
||||
: "2FA Not Enabled"} */}
|
||||
</TableCell>
|
||||
{/* <TableCell className="text-right">
|
||||
<span className="text-sm text-muted-foreground">
|
||||
@@ -156,7 +156,7 @@ export const ShowUsers = () => {
|
||||
/>
|
||||
)} */}
|
||||
|
||||
{user.role !== "owner" && (
|
||||
{/* {user.role !== "owner" && (
|
||||
<DialogAction
|
||||
title="Delete User"
|
||||
description="Are you sure you want to delete this user?"
|
||||
@@ -185,7 +185,7 @@ export const ShowUsers = () => {
|
||||
Delete User
|
||||
</DropdownMenuItem>
|
||||
</DialogAction>
|
||||
)}
|
||||
)} */}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</TableCell>
|
||||
|
||||
Reference in New Issue
Block a user