Fix permission checks so they're all lowercase.