More flight like status role names and parameter names

This commit is contained in:
Michael Rogers 2023-06-20 17:41:12 -05:00
parent 528f87e930
commit 71d8ffdd80
3 changed files with 7 additions and 7 deletions

View File

@ -67,8 +67,8 @@ export default class ExampleUserProvider extends EventEmitter {
this.user = undefined;
this.loggedIn = false;
this.autoLoginUser = undefined;
this.statusRoleValues = statusRoles.map(x => ({
role: x,
this.statusRoleValues = statusRoles.map(role => ({
role: role,
status: STATUSES[0]
}));
this.pollQuestion = undefined;
@ -183,7 +183,7 @@ export default class ExampleUserProvider extends EventEmitter {
// for testing purposes, this will skip the form, this wouldn't be used in
// a normal authentication process
if (this.autoLoginUser) {
this.user = new this.ExampleUser(id, this.autoLoginUser, ['test-role-1', 'test-role-2', 'test-role-3', 'test-role-4']);
this.user = new this.ExampleUser(id, this.autoLoginUser, ['flight', 'driver', 'observer']);
this.loggedIn = true;
return Promise.resolve();

View File

@ -22,7 +22,7 @@
import ExampleUserProvider from './ExampleUserProvider';
const AUTO_LOGIN_USER = 'guest';
const STATUS_ROLES = ['test-role-1', 'test-role-2', 'test-role-3'];
const STATUS_ROLES = ['flight', 'driver'];
export default function ExampleUserPlugin({autoLoginUser, statusRoles} = {
autoLoginUser: AUTO_LOGIN_USER,

View File

@ -71,9 +71,9 @@ export default {
},
promptForRoleSelection() {
const allRoles = this.openmct.user.getPossibleRoles();
const selectionOptions = allRoles.map(x => ({
key: x,
name: x
const selectionOptions = allRoles.map(role => ({
key: role,
name: role
})).filter(this.openmct.user.canProvideStatusForRole);
const dialog = this.openmct.overlays.selection({