mirror of
https://github.com/nasa/openmct.git
synced 2025-01-14 16:59:54 +00:00
Remove default status role from example user plugin
This commit is contained in:
parent
7a4d661e48
commit
c52ee6c40d
@ -23,18 +23,14 @@
|
|||||||
import ExampleUserProvider from './ExampleUserProvider';
|
import ExampleUserProvider from './ExampleUserProvider';
|
||||||
const AUTO_LOGIN_USER = 'guest';
|
const AUTO_LOGIN_USER = 'guest';
|
||||||
const STATUS_ROLES = ['test-role-1', 'test-role-2', 'test-role-3'];
|
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,
|
autoLoginUser: AUTO_LOGIN_USER,
|
||||||
statusRoles: STATUS_ROLES,
|
statusRoles: STATUS_ROLES
|
||||||
defaultStatusRole: DEFAULT_STATUS_ROLE
|
|
||||||
}) {
|
}) {
|
||||||
return function install(openmct) {
|
return function install(openmct) {
|
||||||
const defaultStatusRoleOrFirstItem = statusRoles.includes(defaultStatusRole) ? defaultStatusRole : statusRoles[0];
|
|
||||||
const userProvider = new ExampleUserProvider(openmct, {
|
const userProvider = new ExampleUserProvider(openmct, {
|
||||||
statusRoles,
|
statusRoles
|
||||||
defaultStatusRole: defaultStatusRoleOrFirstItem
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (autoLoginUser !== undefined) {
|
if (autoLoginUser !== undefined) {
|
||||||
|
Loading…
Reference in New Issue
Block a user