[Erp5-report] r19406 - /erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Feb 19 17:38:31 CET 2008
Author: romain
Date: Tue Feb 19 17:38:30 2008
New Revision: 19406
URL: http://svn.erp5.org?rev=19406&view=rev
Log:
Add sql_catalog_role_keys and sql_catalog_local_role_keys to catalog, in order
to configure explicitely which column should be mapped when generation security
query.
Modified:
erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
Modified: erp5/trunk/products/ZSQLCatalog/SQLCatalog.py
URL: http://svn.erp5.org/erp5/trunk/products/ZSQLCatalog/SQLCatalog.py?rev=19406&r1=19405&r2=19406&view=diff
==============================================================================
--- erp5/trunk/products/ZSQLCatalog/SQLCatalog.py (original)
+++ erp5/trunk/products/ZSQLCatalog/SQLCatalog.py Tue Feb 19 17:38:30 2008
@@ -449,6 +449,17 @@
'description' : 'Virtual columns to generate scriptable scriptable queries',
'type' : 'lines',
'mode' : 'w' },
+ { 'id': 'sql_catalog_role_keys',
+ 'title': 'Role keys',
+ 'description': 'Columns which should be used to map a monovalued role',
+ 'type': 'lines',
+ 'mode': 'w' },
+ { 'id': 'sql_catalog_local_role_keys',
+ 'title': 'Local Role keys',
+ 'description': 'Columns which should be used to map' \
+ 'a monovalued local role',
+ 'type': 'lines',
+ 'mode': 'w' },
)
sql_catalog_produce_reserved = ''
@@ -484,6 +495,8 @@
sql_catalog_index_on_order_keys = ()
sql_catalog_related_keys = ()
sql_catalog_scriptable_keys = ()
+ sql_catalog_role_keys = ()
+ sql_catalog_local_role_keys = ()
# These are ZODB variables, so shared by multiple Zope instances.
# This is set to the last logical time when clearReserved is called.
@@ -514,6 +527,20 @@
self.names = {} # mapping from column to attribute name
self.indexes = {} # empty mapping
self.filter_dict = PersistentMapping()
+
+ def getSQLCatalogRoleKeysList(self):
+ """
+ Return the list of role keys.
+ """
+ return [tuple([y.strip() for y in x.split('|')]) \
+ for x in self.sql_catalog_role_keys]
+
+ def getSQLCatalogLocalRoleKeysList(self):
+ """
+ Return the list of local role keys.
+ """
+ return [tuple([y.strip() for y in x.split('|')]) \
+ for x in self.sql_catalog_local_role_keys]
def manage_exportProperties(self, REQUEST=None, RESPONSE=None):
"""
More information about the Erp5-report
mailing list