Skip to content

Commit 2f4bacf

Browse files
committed
fix #8137 - allow collab to deprovision
1 parent 9219fd3 commit 2f4bacf

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/packages/frontend/compute/action.tsx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,11 @@ export default function getActions({
4141
for (const action of s.actions) {
4242
if (
4343
!editable &&
44-
action != "stop" &&
45-
action != "deprovision" &&
46-
action != "start" &&
47-
action != "suspend" &&
48-
action != "resume" &&
49-
action != "reboot"
44+
!["stop", "start", "suspend", "resume", "reboot", "deprovision"].includes(
45+
action,
46+
)
5047
) {
51-
// non-owner can only do start/stop/suspend/resume -- NOT delete or deprovision.
52-
continue;
53-
}
54-
if (!editable && action == "deprovision" && !configuration.ephemeral) {
55-
// also do not allow NON ephemeral deprovision by collaborator.
56-
// For ephemeral, collab is encouraged to delete server.
48+
// non-owner can only do start/stop/suspend/resume/deprovision -- NOT delete.
5749
continue;
5850
}
5951
const a = ACTION_INFO[action];

0 commit comments

Comments
 (0)