From c52ee6c40dbc20a20dbc128f5756488d48423088 Mon Sep 17 00:00:00 2001 From: Michael Rogers Date: Thu, 15 Jun 2023 11:53:45 -0500 Subject: [PATCH] Remove default status role from example user plugin --- example/exampleUser/plugin.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/example/exampleUser/plugin.js b/example/exampleUser/plugin.js index c54bb6f368..f3726591f0 100644 --- a/example/exampleUser/plugin.js +++ b/example/exampleUser/plugin.js @@ -23,18 +23,14 @@ import ExampleUserProvider from './ExampleUserProvider'; const AUTO_LOGIN_USER = 'guest'; const STATUS_ROLES = ['test-role-1', 'test-role-2', 'test-role-3']; -const DEFAULT_STATUS_ROLE = STATUS_ROLES[2]; -export default function ExampleUserPlugin({autoLoginUser, statusRoles, defaultStatusRole} = { +export default function ExampleUserPlugin({autoLoginUser, statusRoles} = { autoLoginUser: AUTO_LOGIN_USER, - statusRoles: STATUS_ROLES, - defaultStatusRole: DEFAULT_STATUS_ROLE + statusRoles: STATUS_ROLES }) { return function install(openmct) { - const defaultStatusRoleOrFirstItem = statusRoles.includes(defaultStatusRole) ? defaultStatusRole : statusRoles[0]; const userProvider = new ExampleUserProvider(openmct, { - statusRoles, - defaultStatusRole: defaultStatusRoleOrFirstItem + statusRoles }); if (autoLoginUser !== undefined) {