changing the SQL for the find by user ID in permission collection