Security configuration resolved even in templates