﻿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
18979	"PermWrapper + template ""if in"" interaction"	Anssi Kääriäinen	Anssi Kääriäinen	"Trying to do
{{{
{% if 'someperm' in perms.someapp %}has perm{% else %}no perm{% endif %}
}}}
will result in endless loop. Above, the perms is !PermWrapper as installed by the !RequestContext.

Doing {{{ if perms.someapp.someperm }}} works correctly. I tried the above because I have a permission codename (from external database) which contains '-', so I can't use the documented syntax.

The attached tester project shows this error. run devserver, click the link, and you will have the dev-server in endless loop which isn't even killable by Ctrl-c... So, be prepared to kill the server by force.

I know the above isn't documented use of !PermWrapper. But, to me it seems this bug isn't a !PermWrapper bug, what it does looks sane to me. So, I am suspecting there could be some underlying bug in the template engine. So, I am marking this into Template system, though the bug could be elsewhere, too.

Tested with 1.4.1 and 1.5.dev20120918050907 with Python 2.7.3.
"	Bug	closed	Template system	1.4	Normal	fixed			Ready for checkin	0	0	0	0	0	0
