Commit c57bbff1 authored by Jérome Perrin's avatar Jérome Perrin

update docstring to make it clear the it is getAllowedRolesAndUsers but not...

update docstring to make it clear the it is getAllowedRolesAndUsers but not getSQLCatalog which is deprecated.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13303 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f5127ab4
...@@ -406,7 +406,8 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): ...@@ -406,7 +406,8 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
those documents for which the user (or the group) was those documents for which the user (or the group) was
associated one of the given local roles. associated one of the given local roles.
XXX allowedRolesAndUsers naming is wrong The use of getAllowedRolesAndUsers is deprecated, you should use
getSecurityQuery instead
""" """
user = _getAuthenticatedUser(self) user = _getAuthenticatedUser(self)
allowedRolesAndUsers = self._listAllowedRolesAndUsers(user) allowedRolesAndUsers = self._listAllowedRolesAndUsers(user)
...@@ -452,9 +453,9 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject): ...@@ -452,9 +453,9 @@ class CatalogTool (UniqueObject, ZCatalog, CMFCoreCatalogTool, ActiveObject):
security.declarePublic( 'getSecurityQuery' ) security.declarePublic( 'getSecurityQuery' )
def getSecurityQuery(self, query=None, **kw): def getSecurityQuery(self, query=None, **kw):
""" """
Build a query based on allowed roles (DEPRECATED) Build a query based on allowed roles or on a list of security_uid
or on a list of security_uid values. The query takes into values. The query takes into account the fact that some roles are
account the fact that some roles are catalogued with columns. catalogued with columns.
""" """
allowedRolesAndUsers, role_column_dict = self.getAllowedRolesAndUsers(**kw) allowedRolesAndUsers, role_column_dict = self.getAllowedRolesAndUsers(**kw)
catalog = self.getSQLCatalog() catalog = self.getSQLCatalog()
......
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