Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Example User Plugin] Unable to pass in just one argument, out of order method call #7727

Open
1 of 7 tasks
jvigliotta opened this issue May 13, 2024 · 0 comments · May be fixed by #7728
Open
1 of 7 tasks

[Example User Plugin] Unable to pass in just one argument, out of order method call #7727

jvigliotta opened this issue May 13, 2024 · 0 comments · May be fixed by #7728
Assignees
Labels
not_viper Temporary label to define bugs that won't affect viper deployments severity:medium type:bug

Comments

@jvigliotta
Copy link
Contributor

Summary

The way the argument object is set up for the example user provider makes it so you can't pass in just one option. The object you pass in overwrites the defaults object completely.

Another issue was the getPossibleRoles method of the ExampleUserProvider, not checking if the login promise has resolved before trying to access the user object.

These issues combine to make it so you can never get to the example login form.

Expected vs Current Behavior

You should be able to pass in just one option and methods shouldn't try to access an asynchronously resolved item, before it's been resolved.

Steps to Reproduce

  1. Install the user provider like so, openmct.install(openmct.plugins.example.ExampleUser({ autoLoginUser: false });
  2. Notice errors in the console and no login form

Example code to show the root of the issue:

function argTest({ one, two } = { one: 'one', two: 'two' }) { console.log(one, two); }

argTest({ one: 'three' }); // output: "three undefined"

Environment

  • Open MCT Version:
  • Deployment Type:
  • OS:
  • Browser:

Impact Check List

  • Data loss or misrepresented data?
  • Regression? Did this used to work or has it always been broken?
  • Is there a workaround available?
  • Does this impact a critical component?
  • Is this just a visual bug with no functional impact?
  • Does this block the execution of e2e tests?
  • Does this have an impact on Performance?

Additional Information

@jvigliotta jvigliotta self-assigned this May 13, 2024
@unlikelyzero unlikelyzero added severity:medium not_viper Temporary label to define bugs that won't affect viper deployments labels May 14, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
not_viper Temporary label to define bugs that won't affect viper deployments severity:medium type:bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants