Commit 60e846fe authored by Vincent Pelletier's avatar Vincent Pelletier

SQLCatalog_zGetDocumentValueList: Tolerate security query being None

getSecurityQuery returns None when caller is superuser. Avoid passing it
to buildSQLQuery, as it would mistake security_query for a column name.
parent 31e019b7
<dtml-let
asQuery="getattr(search_context, 'asQuery', None)"
dummy="None if asQuery is None else kw.update({'websection_query': asQuery()})"
query="
buildSQLQuery(
security_query=getSecurityQuery(sql_catalog_id=getId(),
local_roles=kw.pop('local_roles', None)),
**kw
)
"
security_query="getSecurityQuery(sql_catalog_id=getId(), local_roles=kw.pop('local_roles', None))"
dummy2="None if security_query is None else kw.update({'security_query': security_query})"
query="buildSQLQuery(**kw)"
optimizer_switch_key_list="getOptimizerSwitchKeyList()"
>
<dtml-comment>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment