From 9870a6bc9c1ccb33c24c0d50f7f5e15aa2f68f9f Mon Sep 17 00:00:00 2001 From: Scott Bell Date: Fri, 16 Feb 2024 22:45:04 +0100 Subject: [PATCH] Check role when receiving status updates in the Operator Status Indicator (#7509) * check role when receiving status updates * pass role to get status --- .../operatorStatus/operatorStatus/OperatorStatus.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/operatorStatus/operatorStatus/OperatorStatus.vue b/src/plugins/operatorStatus/operatorStatus/OperatorStatus.vue index ec2c6f9a3f..3671d865f3 100644 --- a/src/plugins/operatorStatus/operatorStatus/OperatorStatus.vue +++ b/src/plugins/operatorStatus/operatorStatus/OperatorStatus.vue @@ -129,7 +129,7 @@ export default { this.role = activeRole; const status = await this.openmct.user.status.getStatusForRole(activeRole); if (status !== undefined) { - this.setStatus({ status }); + this.setStatus({ role: this.role, status }); } }, subscribeToMyStatus() { @@ -141,7 +141,11 @@ export default { subscribeToRoleChange() { this.openmct.user.on('roleChanged', this.fetchMyStatus); }, - setStatus({ status }) { + setStatus({ role, status }) { + if (role !== this.role) { + // not my role + return; + } status = this.applyStyling(status); this.selectedStatus = status.key; this.indicator.iconClass(status.iconClassPoll);