Commit c21f8a81 authored by 's avatar

- added security declarations (Collector #1222)

parent 29c8c57c
...@@ -10,13 +10,19 @@ ...@@ -10,13 +10,19 @@
# FOR A PARTICULAR PURPOSE # FOR A PARTICULAR PURPOSE
# #
############################################################################## ##############################################################################
""" """ API documentation help topics.
API documentation help topics
$Id: APIHelpTopic.py,v 1.17 2004/05/04 19:09:29 yuppie Exp $
""" """
import types import types
from AccessControl import ClassSecurityInfo
from Globals import DTMLFile
from Globals import InitializeClass
from Globals import Persistent
import HelpTopic import HelpTopic
from Globals import DTMLFile, Persistent
_ignore_objects = {} _ignore_objects = {}
...@@ -26,9 +32,9 @@ try: ...@@ -26,9 +32,9 @@ try:
except ImportError: except ImportError:
pass pass
class APIHelpTopic(HelpTopic.HelpTopic): class APIHelpTopic(HelpTopic.HelpTopic):
""" """ Provides API documentation.
Provides API documentation.
""" """
isAPIHelpTopic=1 isAPIHelpTopic=1
...@@ -85,9 +91,13 @@ class APIHelpTopic(HelpTopic.HelpTopic): ...@@ -85,9 +91,13 @@ class APIHelpTopic(HelpTopic.HelpTopic):
class APIDoc(Persistent): class APIDoc(Persistent):
""" Describes an API.
""" """
Describes an API.
""" security = ClassSecurityInfo()
security.setDefaultAccess( {'attributes': True, 'constructor': True,
'doc': True, 'extends': True, 'name': True,
'methods': True} )
extends=() extends=()
...@@ -172,22 +182,27 @@ class APIDoc(Persistent): ...@@ -172,22 +182,27 @@ class APIDoc(Persistent):
view=DTMLFile('dtml/APIView', globals()) view=DTMLFile('dtml/APIView', globals())
InitializeClass(APIDoc)
class AttributeDoc(Persistent): class AttributeDoc(Persistent):
""" """ Describes an attribute of an API.
Describes an attribute of an API.
""" """
security = ClassSecurityInfo()
security.setDefaultAccess( {'name': True, 'value': True} )
def __init__(self, name, value): def __init__(self, name, value):
self.name=name self.name=name
self.value=value self.value=value
view=DTMLFile('dtml/attributeView', globals()) view=DTMLFile('dtml/attributeView', globals())
InitializeClass(AttributeDoc)
class MethodDoc(Persistent): class MethodDoc(Persistent):
""" """ Describes a method of an API.
Describes a method of an API.
required - a sequence of required arguments required - a sequence of required arguments
optional - a sequence of tuples (name, default value) optional - a sequence of tuples (name, default value)
...@@ -195,6 +210,11 @@ class MethodDoc(Persistent): ...@@ -195,6 +210,11 @@ class MethodDoc(Persistent):
kwargs - the name of the kw argument or None kwargs - the name of the kw argument or None
""" """
security = ClassSecurityInfo()
security.setDefaultAccess( {'doc': True, 'kwargs': True, 'name': True,
'optional': True, 'required': True,
'varargs': True} )
varargs=None varargs=None
kwargs=None kwargs=None
...@@ -250,6 +270,8 @@ class MethodDoc(Persistent): ...@@ -250,6 +270,8 @@ class MethodDoc(Persistent):
view=DTMLFile('dtml/methodView', globals()) view=DTMLFile('dtml/methodView', globals())
InitializeClass(MethodDoc)
def trim_doc_string(text): def trim_doc_string(text):
""" """
......
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