Fixing test "test_list_with_perms" after refactoring permission code in utils.py