[% IF $user->auth(A) && $user->auth(B) && $user->auth(C) %]
To me, this is hardly better than the HTML::Template example. It's shorter but it's no easier on the poor HTML designer that has to maintain your templates. I'd boil that down to:
<tmpl_if can_foo>foo</tmpl_if>
Then I'd move all that complex AND logic into Perl where it belongs. There's no reason your security policy should be embedded in your templates!
I may have jumped the gun a little when I suggested TT as my first reply, but sessions and session management imply, to me, a security model with authorities and roles and ... So, I overthink things a little ... is that a crime??
It's not a crime, merely a disservice. The poster sounds like a novice to me and it's not nice to stear him towards a complex solution that he probably doesn't need. Just because he wants sessions doesn't mean he needs an overly complex authority system like you!
-sam
In reply to Re^6: HTML::Template and authenticated sessions
by samtregar
in thread HTML::Template and authenticated sessions
by ghettofinger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |