Commit 31ec426a authored by Ayush Tiwari's avatar Ayush Tiwari

sql_catalog: Change security on methods which are needed 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 8d82d382
...@@ -1111,7 +1111,7 @@ class Catalog(Folder, ...@@ -1111,7 +1111,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):
""" """
...@@ -1148,7 +1148,7 @@ class Catalog(Folder, ...@@ -1148,7 +1148,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):
""" """
...@@ -1162,7 +1162,7 @@ class Catalog(Folder, ...@@ -1162,7 +1162,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):
""" """
...@@ -1176,7 +1176,7 @@ class Catalog(Folder, ...@@ -1176,7 +1176,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
...@@ -1895,7 +1895,7 @@ class Catalog(Folder, ...@@ -1895,7 +1895,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
......
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