in_array parameter order was incorrect in ->hasPermission