in reply to Re^5: HTML::Template and authenticated sessions
in thread HTML::Template and authenticated sessions
[% 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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: HTML::Template and authenticated sessions
by ghettofinger (Monk) on May 12, 2005 at 16:35 UTC | |
|
Re^7: HTML::Template and authenticated sessions
by dragonchild (Archbishop) on May 11, 2005 at 17:21 UTC | |
by samtregar (Abbot) on May 11, 2005 at 22:00 UTC |