Show only granted gates in menu

This commit is contained in:
2025-05-24 00:08:08 +02:00
parent 5b8cbf8b9f
commit 9af398faef
5 changed files with 35 additions and 8 deletions

View File

@@ -31,6 +31,9 @@ class Gates:
def get_name(self, gate: str) -> str | None:
return self._gates[gate].name if gate in self._gates else None
def get_all_gates_id(self) -> list[str]:
return [gate for gate in self._gates.keys() if self._gates[gate].status == Status.ENABLED]
def open_gate(self, gate: str, credentials: Credential) -> bool:
if gate not in self._gates: