[Zope] dtml sessions

Dennis Allison allison at shasta.stanford.edu
Sat Jun 18 12:58:34 EDT 2005


Ah ha!  you have as method that is supposed to be private to a particular 
user.   You should set the view permission for the method to be 
"Authorized User" and have the method test for the particular user and 
do nothing if the current user is not the right one.

A more general mechanism would be to create a local role for privileged 
users and set the view permission for the dtml-method to be that role.  
The you can give any user that role in acl_users and they will 
automagically have access rights to that method.

Good web design suggests that the navigation to this special method be 
controlled by the role as well so there's no button to push if the user
is not allowed to push the button.


On Sat, 18 Jun 2005, Andy Kim wrote:

> No, not just only once but rather for one browser session.
> If the page is reloaded again the method shouldnt be called.
> Only if the user comes for a next visit, the method should be called again.
> It actually should be easy, I'm just not familiar with dtml programming yet.
> However I'd like to have it with dtml since I have the dtml-call
> method already using..
> 
> On 6/18/05, Andreas Jung <lists at andreas-jung.com> wrote:
> > 
> > 
> > --On 18. Juni 2005 18:16:48 +0200 Andy Kim <dobedo at gmail.com> wrote:
> > 
> > > Hi,
> > > I'm a beginner.
> > > I'd like allow a dtml method call e.g. <dtml-call method> for one session
> > > only. how do I do this with dtml?
> > > could anyone help me?
> > 
> > What do you mean by that? Should it callable only once? If yes then of
> > course use a flag which you can store inside the user session.
> > 
> > -aj
> > 
> >
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
> 

-- 
Dennis Allison * Computer Systems Laboratory * Gates 227
               * Stanford University *  Stanford CA  94305
	       * (650) 723-9213 * (650) 723-0033 fax
	       * allison at shasta.stanford.edu
	       * allison at sumeru.stanford.edu




More information about the Zope mailing list