mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-11-17 04:02:21 -05:00
allow admins to always leave rover canleaverover always admins
Container image / image (push) Failing after 1m2s
Container image / image (push) Failing after 1m2s
This commit is contained in:
@@ -174,6 +174,8 @@ function createRoverLifecycle(deps) {
|
|||||||
|
|
||||||
function canLeaveCurrentRover(socket, options = {}) {
|
function canLeaveCurrentRover(socket, options = {}) {
|
||||||
const currentId = getPrimaryRoverForSocket(socket.id);
|
const currentId = getPrimaryRoverForSocket(socket.id);
|
||||||
|
// Admins, including lockdown admins, can always leave their current rover.
|
||||||
|
if (isAdmin(socket)) return { ok: true, currentId };
|
||||||
/*
|
/*
|
||||||
Leaving a rover is only risky when this socket is the last person attached
|
Leaving a rover is only risky when this socket is the last person attached
|
||||||
to an undocked rover. The same rule is used for rover-to-rover switching
|
to an undocked rover. The same rule is used for rover-to-rover switching
|
||||||
|
|||||||
Reference in New Issue
Block a user