codebox-npm icon indicating copy to clipboard operation
codebox-npm copied to clipboard

CODEBOX_ADMINS github usernames should be case-insensitive

Open brimworks opened this issue 7 years ago • 0 comments

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 or wip

Is this a breaking change?: NO

brimworks avatar Jul 25 '17 17:07 brimworks