Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix typos and string/bool issues with admin_dashboard.token_generate #137

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

JGreenlee
Copy link
Collaborator

@JGreenlee JGreenlee commented Jan 17, 2025

When I was meeting with sm-ebike, I saw that their admin dashboard had the Tokens page enabled. To my surprise, I looked at their config and saw "token_generate": "false"

Then I realized it should be false with no quotes. A string containing the word "false" evaluates as a truthy value, causing the Tokens page to show up.

Looking further I realized there are actually 2 issues going on here. A lot of other programs have it misspelled as toekn_generate, which is because of a typo in parse-issue-body.js

So in parse-issue-body.js I fixed both the typo and the string/boolean mixup, then I manually fixed all the affected configs.

When I was meeting with sm-ebike, I saw that their admin dashboard had the Tokens page enabled.
To my surprise, I looked at their config and saw `"token_generate": "false"`

Then I realized it should be `false` with no quotes. A string containing the word `"false"` evaluates as a truthy value and causes the Tokens page to show up.

Looking further I realized there's actually 2 issues going on here. A lot of other programs have it misspelled as toekn_generate, which is because of a typo in parse-issue-body.js

In parse-issue-body.js I fixed both the typo and the string/boolean mixup, then I manually fixed all the affected configs.
Copy link
Member

@Abby-Wheelis Abby-Wheelis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for catching this!

I was confused at first by the transition from combinedObject.autogen to configObject['opcode']['autogen'], but after looking into it I think it makes a lot of sense to refer to the established variable, which is already cleaned, to lock down that autogen = token_generate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants