Commit 1ac866e9 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Add security declarations.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4020 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9c22a521
...@@ -77,6 +77,7 @@ class Predicate(Folder): ...@@ -77,6 +77,7 @@ class Predicate(Folder):
# Declarative interfaces # Declarative interfaces
__implements__ = ( Interface.Predicate ) __implements__ = ( Interface.Predicate )
security.declareProtected( Permissions.AccessContentsInformation, 'test' )
def test(self, context, **kw): def test(self, context, **kw):
""" """
A Predicate can be tested on a given context. A Predicate can be tested on a given context.
...@@ -150,6 +151,7 @@ class Predicate(Folder): ...@@ -150,6 +151,7 @@ class Predicate(Folder):
# XXX Add here additional method calls # XXX Add here additional method calls
return result return result
security.declareProtected( Permissions.AccessContentsInformation, 'asSqlExpression' )
def asSqlExpression(): def asSqlExpression():
""" """
A Predicate can be rendered as an SQL expression. This A Predicate can be rendered as an SQL expression. This
...@@ -236,6 +238,7 @@ class Predicate(Folder): ...@@ -236,6 +238,7 @@ class Predicate(Folder):
return self._edit(**kwd) return self._edit(**kwd)
# Predicate fusion method # Predicate fusion method
security.declareProtected( Permissions.ModifyPortalContent, 'setPredicateCategoryList' )
def setPredicateCategoryList(self, category_list): def setPredicateCategoryList(self, category_list):
""" """
This method updates a Predicate by implementing an This method updates a Predicate by implementing an
...@@ -284,6 +287,7 @@ class Predicate(Folder): ...@@ -284,6 +287,7 @@ class Predicate(Folder):
self._setTestMethodIdList(test_method_id_list) self._setTestMethodIdList(test_method_id_list)
self.reindexObject() self.reindexObject()
security.declareProtected(Permissions.AccessContentsInformation, 'generatePredicate')
def generatePredicate(self,multimembership_criterion_base_category_list=(), def generatePredicate(self,multimembership_criterion_base_category_list=(),
membership_criterion_base_category_list=(), membership_criterion_base_category_list=(),
criterion_property_list=()): criterion_property_list=()):
......
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