mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-20 08:01:35 +00:00
Hide Delete button on script detail page for non-workspace-admins
This commit is contained in:
@@ -565,14 +565,16 @@
|
||||
})
|
||||
}
|
||||
|
||||
menuItems.push({
|
||||
label: 'Delete',
|
||||
Icon: Trash,
|
||||
onclick: async () => {
|
||||
deleteScript(script.hash)
|
||||
},
|
||||
color: 'red'
|
||||
})
|
||||
if ($userStore?.is_admin || $userStore?.is_super_admin) {
|
||||
menuItems.push({
|
||||
label: 'Delete',
|
||||
Icon: Trash,
|
||||
onclick: async () => {
|
||||
deleteScript(script.hash)
|
||||
},
|
||||
color: 'red'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return menuItems
|
||||
|
||||
Reference in New Issue
Block a user