mirror of
https://github.com/nasa/openmct.git
synced 2025-01-13 16:29:57 +00:00
More flight like status role names and parameter names
This commit is contained in:
parent
528f87e930
commit
71d8ffdd80
@ -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();
|
||||
|
@ -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,
|
||||
|
@ -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({
|
||||
|
Loading…
Reference in New Issue
Block a user