codebox-npm
codebox-npm copied to clipboard
CODEBOX_ADMINS github usernames should be case-insensitive
One of our admin users give me their github username, but the API returned their user-name with some capitol letters which made them appear as though they were not administrators.
What did you implement:
Closes #12345 (Github)
Github admin usernames should be case-insensitive.
How did you implement it:
Lower-case the usernames and then do indexOf() to check if the username exists.
How can we verify it:
Set CODEBOX_ADMINS to contain your github username in a case that is different than the canonical casing.
...also the unit test verifies it works.
Todos:
- [x ] Write tests
- [ ] ~~Write documentation~~
- [ ] ~~Fix linting errors~~
- [ ] Tag
ready for review
orwip
Is this a breaking change?: NO