alittlebroken / recipefinder-backend

0 stars 0 forks source link

checkRoles is case sensitive #78

Closed alittlebroken closed 1 year ago

alittlebroken commented 1 year ago

When comparing a routes allowed role to the user role the comparison is case sensitive.

This means if a role is set as admin for the user but Admin for the route it will not match.

This PR aims to correct this by making sure both sides of the comparison are lowercase