﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33269	Raise an error if a string is passed into has_perms() instead of a list	lieryan	lieryan	"A colleague made this error recently doing a `user.has_perms(""foobar"")` instead of the correct `user.has_perms([""foobar""])` or `user.has_perm(""foobar"")`. The code initially appeared to work fine since in Python, `str` is an iterable that returned individual characters as string when iterated over.

We checked for `str` in particular rather than enforcing it to be a `list`, since `perm_list` may actually be tuple, set, generators, or other iterables.

An alternative way this could be fixed is to just silently behave like `has_perm()` if `perm_list` is actually a string rather than raising an error, but that'll probably enforce a bad habit.

Pull request in  Github (https://github.com/django/django/pull/14969)."	Cleanup/optimization	closed	contrib.auth	3.2	Normal	fixed			Ready for checkin	1	0	0	0	0	0
