Commit 766a7b31 authored by Ayush Tiwari's avatar Ayush Tiwari Committed by Ayush Tiwari

Products.ZSQLCatalog: Make several schema-related methods public.

These methods will be used in erp5 catalog view in restricted environment.
Loosen the security on methods which we will use in erp5 catalog view in
restricted environment. As suggested by \@vpelletier, this should be
accepted as all methods were restricted by default earlier.
parent 17feb735
...@@ -1106,7 +1106,7 @@ class Catalog(Folder, ...@@ -1106,7 +1106,7 @@ class Catalog(Folder,
""" """
return self._getCatalogSchema()[table] return self._getCatalogSchema()[table]
security.declarePrivate('getColumnIds') security.declarePublic('getColumnIds')
@transactional_cache_decorator('SQLCatalog.getColumnIds') @transactional_cache_decorator('SQLCatalog.getColumnIds')
def getColumnIds(self): def getColumnIds(self):
""" """
...@@ -1143,7 +1143,7 @@ class Catalog(Folder, ...@@ -1143,7 +1143,7 @@ class Catalog(Folder,
result.setdefault('%s.%s' % (table, field), []).append(table) # Is this inconsistent ? result.setdefault('%s.%s' % (table, field), []).append(table) # Is this inconsistent ?
return result return result
security.declarePrivate('getResultColumnIds') security.declarePublic('getResultColumnIds')
@transactional_cache_decorator('SQLCatalog.getResultColumnIds') @transactional_cache_decorator('SQLCatalog.getResultColumnIds')
def getResultColumnIds(self): def getResultColumnIds(self):
""" """
...@@ -1157,7 +1157,7 @@ class Catalog(Folder, ...@@ -1157,7 +1157,7 @@ class Catalog(Folder,
keys.add('%s.%s' % (table, field)) keys.add('%s.%s' % (table, field))
return sorted(keys) return sorted(keys)
security.declarePrivate('getSortColumnIds') security.declarePublic('getSortColumnIds')
@transactional_cache_decorator('SQLCatalog.getSortColumnIds') @transactional_cache_decorator('SQLCatalog.getSortColumnIds')
def getSortColumnIds(self): def getSortColumnIds(self):
""" """
...@@ -1171,7 +1171,7 @@ class Catalog(Folder, ...@@ -1171,7 +1171,7 @@ class Catalog(Folder,
keys.add('%s.%s' % (table, field)) keys.add('%s.%s' % (table, field))
return sorted(keys) return sorted(keys)
security.declarePrivate('getTableIds') security.declarePublic('getTableIds')
def getTableIds(self): def getTableIds(self):
""" """
Calls the show table method and returns dictionnary of Calls the show table method and returns dictionnary of
...@@ -1892,7 +1892,7 @@ class Catalog(Folder, ...@@ -1892,7 +1892,7 @@ class Catalog(Folder,
ids.sort() ids.sort()
return ids return ids
security.declarePrivate('getPythonMethodIds') security.declarePublic('getPythonMethodIds')
def getPythonMethodIds(self): def getPythonMethodIds(self):
""" """
Returns a list of all python scripts available in Returns a list of all python scripts available in
......
  • I think the commit message makes a logical inversion in my stance: before @kazuhiko's work on security declaration, these methods were public. Then they became private, likely because there was no restricted caller.

    Other than commit message, can be pushed to master without waiting for the merge request.

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