[Zope3-Users] How to pass an added object to redirected page

2005-10-20 Thread Naotoshi Seo
I would like to make a page like that users can make sure what they inputted at addform page. Now, my codes are simply like And, in the specified class name, class Classname: def nextURL(self): return 'nexturl.html' So, this is just redirecting to different page after us

[Zope3-Users] How to allow one user to access only his object

2005-10-20 Thread Naotoshi Seo
Hi. I have one more question. Imagine there are a MessageBoard and many Message objects. I would like to allow users to modify only his message as common message board if user type a password for the message. I made a view to show forms to be typed password, and I processed POSTed values, and I r

Re: [Zope3-Users] How to allow one user to access only his object

2005-10-21 Thread Naotoshi Seo
Hi. class MessageTraverser: implements(IPublishTraverse) __used_for__ = IMessage def publishTraverse(self, request, name): if name == 'edit.html': # verify password and return a message or raise NotFoundError. How do I pass POSTed value to publishTraverse's re

Re: [Zope3-Users] How to allow one user to access only his object

2005-10-21 Thread Naotoshi Seo
Hi. At this post method, do I redirect to a URL like ./edit.html?field.passwd=KDJFKJA ? It is not cool. Are there any ways? Why you don't post to "edit.html" from "password.html"? Yes, it worked. It seems I was being confused. zapi.queryView has been deprecated. You should use queryMultiAd

Re: [Zope3-Users] How to allow one user to access only his object

2005-10-21 Thread Naotoshi Seo
Sorry, this code did not make sense. This code trys to traverse 'messageboardobject/messageobject/edit.html' also. I could access directly. I tried to reject only this by replacing else: to elif string.find(name, 'editmine.html') == -1: But, name value receives only 'messageobject' in this case,

Re: [Zope3-Users] How to allow one user to access only his object

2005-10-21 Thread Naotoshi Seo
Hi. I made a traverser for Message objects also, and I prohibited access to editview.html at there. It worked. Thank you, TAHARA. from zope.publisher.interfaces import NotFound from zope.app import zapi from zope.app.container.traversal import ContainerTraverser from zope.publisher.interfaces

Re: [Zope3-Users] How to allow one user to access only his object

2005-10-21 Thread Naotoshi Seo
I got another trouble. I succeeded to show edit.html, but I could not edit actaully. edit.html is an editview page. So, the html has post tag like http://.../messageboardobject/edit.html";> Therefore, same traverser trys to receive this posted action, and trys to check password again (actually,

Re: [Zope3-Users] How to allow one user to access only his object

2005-10-22 Thread Naotoshi Seo
Hi. It worked. interesting. I appreciate, TAHARA. > from zope.app.session.interfaces import ISession > > PACKAGE_NAME = 'your application name' > > class MessageEditView: > > def __init__(self, context, request): > > session = ISession(request)[PACKAGE_NAME] > > password = req