Why: In order to determine whether an admin user is able to edit
a particular location, their email address is compared to the list of
admin_emails associated with the location. When an admin account is
created, the email is automatically converted to lowercase. However,
when an admin email is added to a location, it does not get converted.
The current comparison looks for an exact match. To fix this issue, we
can either fix the comparison to be case insensitive, or automatically
convert admin emails to lowercase. The latter is the simplest
solution, and is what I implemented here.
Why: In order to determine whether an admin user is able to edit a particular location, their email address is compared to the list of admin_emails associated with the location. When an admin account is created, the email is automatically converted to lowercase. However, when an admin email is added to a location, it does not get converted.
The current comparison looks for an exact match. To fix this issue, we can either fix the comparison to be case insensitive, or automatically convert admin emails to lowercase. The latter is the simplest solution, and is what I implemented here.