mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(services): add role-based delete service permissions
- Restrict bulk delete action to owners and users with delete service permissions - Conditionally render delete button based on user role and authorization - Improve service management security by implementing fine-grained access control
This commit is contained in:
parent
85734c0a24
commit
62bd8e3c95
@ -668,6 +668,8 @@ const Project = (
|
|||||||
Stop
|
Stop
|
||||||
</Button>
|
</Button>
|
||||||
</DialogAction>
|
</DialogAction>
|
||||||
|
{(auth?.role === "owner" ||
|
||||||
|
auth?.canDeleteServices) && (
|
||||||
<DialogAction
|
<DialogAction
|
||||||
title="Delete Services"
|
title="Delete Services"
|
||||||
description={`Are you sure you want to delete ${selectedServices.length} services? This action cannot be undone.`}
|
description={`Are you sure you want to delete ${selectedServices.length} services? This action cannot be undone.`}
|
||||||
@ -682,6 +684,8 @@ const Project = (
|
|||||||
Delete
|
Delete
|
||||||
</Button>
|
</Button>
|
||||||
</DialogAction>
|
</DialogAction>
|
||||||
|
)}
|
||||||
|
|
||||||
<Dialog
|
<Dialog
|
||||||
open={isMoveDialogOpen}
|
open={isMoveDialogOpen}
|
||||||
onOpenChange={setIsMoveDialogOpen}
|
onOpenChange={setIsMoveDialogOpen}
|
||||||
|
Loading…
Reference in New Issue
Block a user