13 Feb
2002
13 Feb
'02
6:54 p.m.
Tom Nixon writes:
I want to have a <span> with a tal:condition clause that means it's only displayed if there is an authenticated user logged in, or alternatively if the user has particular privileges. In DTML it would be something like the following but I'm not sure about how to do it in TAL.
<dtml-if expr="_.SecurityCheckPermission('Add Documents, Images, and Files', this())"> Hello authorised user </dtml-if>
I assume something like this: <span tal:condition="python:someSecurityFunction()" tal:replace="string:Hello authorised user"></span> Try:
tal:condition="SecurityCheckPermission('Add Documents, Images, and Files',here)" Dieter