Do not show operator status for roles without status capability#8321
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8321 +/- ##
==========================================
- Coverage 57.17% 57.16% -0.01%
==========================================
Files 728 728
Lines 29702 29703 +1
Branches 2810 2811 +1
==========================================
- Hits 16981 16979 -2
- Misses 12381 12384 +3
Partials 340 340
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
| @@ -0,0 +1,33 @@ | |||
| /***************************************************************************** | |||
| * Open MCT, Copyright (c) 2014-2024, United States Government | |||
There was a problem hiding this comment.
anyone still here in 2026?
Thanks @evenstensberg. I've just created #8323 to address this permanently.
| this.indicator.text(pollQuestion?.question || ''); | ||
| const isStatusCapable = await this.openmct.user.canProvideStatusForRole(); | ||
| if (isStatusCapable) { | ||
| this.indicator.text(pollQuestion?.question || ''); |
There was a problem hiding this comment.
I think we should avoid installing the indicator at all if they cannot set their own status. I think this is what this line is achieving, but in a round-about way?
There was a problem hiding this comment.
Actually, UserAPI.canProvideStatusForRole looks for the active role of the user, so we should still install the indicator in case the user has multiple roles.
Closes #8320
Describe your changes:
Setting Poll updates in Operator Status indicator is now limited by
this.openmct.user.canProvideStatusForRole().This is the same check that will hide Operator Status, but the Poll Question update was overriding this and adding the operator status for that poll regardless of user role.
All Submissions:
Author Checklist
type:label? Note: this is not necessarily the same as the original issue.Reviewer Checklist