Commit 62fbb757 authored by Jim Fulton's avatar Jim Fulton

Changed to use C validate method.

parent ae23306e
"""Document object""" """Document object"""
__version__='$Revision: 1.48 $'[11:-2] __version__='$Revision: 1.49 $'[11:-2]
from Globals import HTML, HTMLFile, MessageDialog from Globals import HTML, HTMLFile, MessageDialog
from string import join,split,strip,rfind,atoi,lower from string import join,split,strip,rfind,atoi,lower
...@@ -8,9 +8,11 @@ from AccessControl.Role import RoleManager ...@@ -8,9 +8,11 @@ from AccessControl.Role import RoleManager
from SimpleItem import Item_w__name__ from SimpleItem import Item_w__name__
from Acquisition import Explicit from Acquisition import Explicit
import regex, Globals, sys import regex, Globals, sys
import cDocumentTemplate
class Document(cDocumentTemplate.cDocument, HTML, Explicit,
class Document(HTML, Explicit, RoleManager, Item_w__name__): RoleManager, Item_w__name__,
):
""" """ """ """
meta_type='Document' meta_type='Document'
icon ='p_/doc' icon ='p_/doc'
...@@ -102,7 +104,7 @@ class Document(HTML, Explicit, RoleManager, Item_w__name__): ...@@ -102,7 +104,7 @@ class Document(HTML, Explicit, RoleManager, Item_w__name__):
if RESPONSE is None: return r if RESPONSE is None: return r
return decapitate(r, RESPONSE) return decapitate(r, RESPONSE)
def validate(self, inst, parent, name, value, md): def oldvalidate(self, inst, parent, name, value, md):
if hasattr(value, '__roles__'): if hasattr(value, '__roles__'):
roles=value.__roles__ roles=value.__roles__
elif inst is parent: elif inst is parent:
......
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