Re: [Zope] Re: login page problem

2005-04-08 Thread Chris Withers
Dieter Maurer wrote:
You are probably right  -- but SimpleUserFolder is really simple (which
sometimes is good).
Simpler is ALWAYS good, as the name of my company kinda gives away ;-)
Nothing should ever be less simple than is absolutely necessary!
Had *you* used all these reusable components to provide the functionality
in SUF, standard users could have used then out of the box -- with just
sumitting a configuration page. As it is now, they have to think
about (e.g.) cache management and invalidation.
All the components I've mentioned so far have been standard Zope 
components. If their documentation isn't so good, that's a seperate 
problem. If I provide work-a-likes, then I have to be responsible for 
that documentation too, which isn't great ;-) That said, maybe I should 
provide more examples of how to get things like caching and cookie auth 
working with SUF?

I would like to stress that I do not think SUF were bad.
I just defend my statement that exUserFolder is something
like a big brother to SUF.
A bloated fat cousin maybe ;-)
cheers,
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-08 Thread Chris Withers
Dieter Maurer wrote:
The RAMCacheManager is associated with (what I call) site building
objects (those have an identifying URL, for example).
Why do you think that?
User objects are not site building.
But in zope, they should always have a url ;-)
The UserFolder is but usual implementations do not inherit
ZCachable -- and therefore cannot (directly) use the
RAMCacheManager.
SUF doesn't need to inehrit from ZCacheable...
When an object supports transparent caching (which would be necessry
for a UserFolder), then it must contain code interfacing with
a cache manager. I doubt that SUF contains such code...
I think transparency (ie: magic, automagical, and other such bullshit) 
is bad. Explicit is better that implicit and all that ;-)

But hopefully you see that the questions are difficult for a standard user.
Only if the standard user needs caching, in which case they should 
understand the choices they're making ;-)

  When he uses SUF and determines that caching is needed because
  authentication and authorization are too costly, he may learn
  that Z SQL Methods can be cached.
  Later, he changes some user properties and has to observe
  that they take effect with a delay (as stale values are cached)
  and there is no reliable way to flush/invalidate the cache.
  He may learn that there are CCZSQLMethods the cache of which
  can be flushed, but he may have had long hours of problems.
That seems entirely natural to me. At any time, he can make choices 
depending on his current needs without being penalised for previous 
choices...

With exUserFolder, he visits the configuration tab
and selects with caching for XXX minutes -- that's
it (unless he uses ZEO).
...which case he gets core confused and is locked into a caching setup 
which he'd have to recode at the python level to get anywhere with ;-)

cheers,
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-07 Thread Chris Withers
Dieter Maurer wrote:
I is just that with exUserFolder, there is a management page
where you configure the parameters for the user cache -- that's all
of it. No special Python Scripts, no association with a RAMCacheManager,
no headache with invalidation (after user object changes through the API)...
Yes, and the implementation was mostly barroque rubbish last time I 
looked at XUF.

I believe in re-using lots of simple compments to build complex 
applications. I hate to see loads of common concepts like caching, 
sessions, cookie-management and rdb interaction re-implemented in 
non-reusable ways so many times...

cheers,
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-07 Thread Chris Withers
Dieter Maurer wrote:
exUserFolder has built in caching (positive and negative caches),
Dunno what that means, but SUF supports caching via standard 
RAMCacheManagers
That sounds very strange: user objects cached in a RAMCacheManager...
Why? How does that memory-based cache differ in concept from the one 
inside XUF? ;-)

or ZSQL method caching.
They cannot be controlled (therefore, I developped CCSQLMethods),
thus, bad luck when you changed a user...
Sorry, not enough info to be a useful comment. I think this boils down 
to CCSQLMethods have better caching that ZSQL Methods, in which case, 
great, use CCSQLMethods instead, SUF is agnostic to what type of 
callable object you use to implement any of the things that need 
implementing. This comes back to the point I made in my other mail: 
allow people to switch in better components as they become available, 
don't tie them to your own duplicate implementation ;-)

What does that entail? SUF should quite happilly replace the userfolder 
in a CMF site...
Maybe, you look at exUserFolder more closely.
I'd really rather not ;-)
The true reason for this suggestion: I, too, do not know it.
It is just a configuration option (that I did not need and therefore
investigate).
That sounds like most of XUF to me. With SUF you start with something 
simple and add what you need, with XUF, you start with something complex 
and get scared by the millions of config options until you finally 
figure out what to turn off. Heh, I guess this is also why I feel the 
way I do about Plone ;-)

Well, SUF does, although I don't know if I ever released that version 
due to broken zope.org, it's available to whoever asks for it though...
That's bad for SUF.
*shrugs* I'll get simplistix.co.uk to a point where I can release code 
there at some stage...

This feature was essential for us.
I looked at SUF and exUserFolder -- and chose exUserFolder
as it better matched our requirements.
I'm happy to send you the latest SUF if you're interesteed :-)
cheers,
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-07 Thread Dieter Maurer
Chris Withers wrote at 2005-4-7 13:29 +0100:
 ...
I believe in re-using lots of simple compments to build complex 
applications. I hate to see loads of common concepts like caching, 
sessions, cookie-management and rdb interaction re-implemented in 
non-reusable ways so many times...

You are probably right  -- but SimpleUserFolder is really simple (which
sometimes is good).

Had *you* used all these reusable components to provide the functionality
in SUF, standard users could have used then out of the box -- with just
sumitting a configuration page. As it is now, they have to think
about (e.g.) cache management and invalidation.


I would like to stress that I do not think SUF were bad.
I just defend my statement that exUserFolder is something
like a big brother to SUF.

Simple is beautiful, if it meats the given requirements...

-- 
Dieter
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-06 Thread Jens Vagelpohl
On Apr 6, 2005, at 0:52, Chris Withers wrote:
Dieter Maurer wrote:
exUserFolder has built in caching (positive and negative caches),
Dunno what that means, but SUF supports caching via standard 
RAMCacheManagers or ZSQL method caching.
negative caching means that there is a separate cache to cache failed 
user lookups for a while and return a failure immediately instead of 
re-trying the user lookup doing a (possibly expensive) user search in 
the underlying backend.It's a little bit like Squids negative_ttl, 
which is used to specify a duration for caching error responses. The 
negative cache allows the backend to recover and/or prevents backend 
overloading because otherwise every failing lookup would hit the 
backend again and again.

jens
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-06 Thread Cliff Ford
I am not sure I have much to add. I have been concerned about your 
product architecture and unusual login procedure, but that is really non 
of my business. Some of what you say below is inconsistent:

 One problem that concerns next query is that it took only one table
 for user details whereas i had one more table for district.
...
 userdetail table is linked using this district code.
From this, and what you said previously, I presume you have login 
working but for only the half of the users in one of the two User 
tables. I already suggested alternative ways of handling this.

If your folders are going to be Districts consider giving users who need 
to fill out forms in one District a Local Role in that District, and 
users who need access to many districts a Local Role in the Districts 
parent folder.

This correspondence is too long for anyone else to follow. Next time, 
may I suggest come back to the list with a new question in a new thread.

Cliff
prabuddha ray wrote:
HI Cliff,
  I was hoping another reply eagerly. hope you dint give up on me.
I've got some clarifications given below.
On Mon, 04 Apr 2005 16:08:50 +0100, Cliff Ford [EMAIL PROTECTED] wrote:
I am abstracting bits of your email below in case anyone else wants to
join in.
If you are going to use Plone I can't offer advice - I have looked at
Plone on three separate occasions, and recently read The Definitive
Guide to Plone, and have stil decided not to use it. I only say this to
make it clear that many applications are built without CMS and Plone.

I had no idea about this. i knew that zope acts as a app server and
plone is the front end tool.
In fact I'm building the store's site as a plone site in zope. As a
matter of fact i've not done much specific in plone . just built 2
tabpanes.
I configured the exUserFolder using the mysql database and as expected
it built up a seperate login system. so i believe it'll work on itself
without plone.
One problem that concerns next query is that it took only one table
for user details whereas i had one more table for district.

Two separate tables with User information is awkward! The user folders I
know of expect user information to come from one source. So you either
have to create two folders, each with its own acl_users (provided by one
of the User Folder Products), or you have to hack the User Folder
product to put in a Union select statement in place of a simple Select.
d quarters.

let me explain the login page flow. a dropdown list of districts is
available on load. on selecting a  district the page reloads and the
available users are listed in 2nd dropdown list.
after selecting the user the password is to be given. So that way i
need both the 'district' and the 'userdetail' table. actually the
district table has district code ,name and other stores related nfo.
userdetail table is linked using this district code.

You have not said whether the people in the different districts do
completely different things with different forms, or identical things
but specifying the district. If the former then it is no big deal to
create the folders manually, although it can be done programmtically.
You could set a Local Role equal to the district name and get that role
for users from the database. That way, users can only enter their own
district folder. If the latter, then you could retrieve the Username and
District from the User object for use in the forms (include the District
as a role).

users are of different level like store-in-charge, sys mgmt group,
vendors and normal users.
they are in all the districts. so depending on the user level diffrent
set of menu page are to be generated ie. users of same level in
diferent districts do same thing.
In earlier ASP version I handled this in the login page handler ASP
page and wanted to use the same logic here.
district shouldn't be the user role , 'userlevel' will act as user role here.
but the folders would be districtwise, I suppose.
honestly I'm little bogged out by the exuserFolder feature, its using
Dtml all the way and I'm sticking to ZPTs and script pythons.

Try working on the rest of your application to build up ZPT and Python
experience. As I said, managing users is tricky. Also, be aware that
Zope experts advise developers to produce file system based Products.
There are lots of simple Products that you can use and browse the code
to see how they work.
Cliff

I completely understand this. but the problem remains the same . how
do i customise these products acccording to my needs.
hope this helps you in helping me. waiting for your reply.
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-06 Thread Chris Withers
Jens Vagelpohl wrote:
negative caching means that there is a separate cache to cache failed 
user lookups for a while and return a failure immediately instead of 
re-trying the user lookup doing a (possibly expensive) user search in 
the underlying backend.It's a little bit like Squids negative_ttl, which 
is used to specify a duration for caching error responses. The negative 
cache allows the backend to recover and/or prevents backend 
overloading because otherwise every failing lookup would hit the backend 
again and again.
Oh right, well, again, should be fairly trivial to setup with python 
scripts and RAMCacheManagers.

cheers,
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-06 Thread Dieter Maurer
Chris Withers wrote at 2005-4-6 10:04 +0100:
 ...
Oh right, well, again, should be fairly trivial to setup with python 
scripts and RAMCacheManagers.

When I called exUserFolder a big brother of SimpleUserFolder
I did not want to imply that you can not add all the missing
features to SimpleUserFolder through additional infrastructures.

I is just that with exUserFolder, there is a management page
where you configure the parameters for the user cache -- that's all
of it. No special Python Scripts, no association with a RAMCacheManager,
no headache with invalidation (after user object changes through the API)...

-- 
Dieter
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-05 Thread Chris Withers
Dieter Maurer wrote:
exUserFolder is something like the big brother of
SimpleUserFolder -- much more complex but also much more flexible...
I dispute that ;-)
I don't know of anything you can do with XUF that can't be done with SUF...
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-05 Thread Dieter Maurer
Chris Withers wrote at 2005-4-5 13:54 +0100:
Dieter Maurer wrote:
 exUserFolder is something like the big brother of
 SimpleUserFolder -- much more complex but also much more flexible...

I dispute that ;-)

That is usual with us two ;-)

I don't know of anything you can do with XUF that can't be done with SUF...

exUserFolder has built in caching (positive and negative caches),
directly integrates with the MembershipTool and support
unlimited additional properties on user objects...

-- 
Dieter
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-05 Thread Paul Winkler
On Tue, Apr 05, 2005 at 09:32:04PM +0200, Dieter Maurer wrote:
 exUserFolder has built in caching (positive and negative caches),

I guess that by negative cache you mean something like
a cache of failed user lookups?
Nice.

-- 

Paul Winkler
http://www.slinkp.com
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-05 Thread Chris Withers
Dieter Maurer wrote:
exUserFolder has built in caching (positive and negative caches),
Dunno what that means, but SUF supports caching via standard 
RAMCacheManagers or ZSQL method caching.

directly integrates with the MembershipTool
What does that entail? SUF should quite happilly replace the userfolder 
in a CMF site...

and support
unlimited additional properties on user objects...
Well, SUF does, although I don't know if I ever released that version 
due to broken zope.org, it's available to whoever asks for it though...

cheers,
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-04 Thread Dieter Maurer
prabuddha ray wrote at 2005-4-4 01:41 -0700:
 ...
 A combination of exUserFolder and MySQL would do.

i don know about them, something like mysqluserfolder or
simpleuserfolder components ?

exUserFolder is something like the big brother of
SimpleUserFolder -- much more complex but also much more flexible...

-- 
Dieter
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-03 Thread Cliff Ford
I have been trying to think of ways of providing specific pointers, So, 
assuming you have a custom login page and a custom python script that 
processes that page:

In the Python script you could set a cookie for the District:
context.REQUEST.RESPONSE.setCookie('District', district)
where district is the name of the District field in the form. The 
District parameter is then always available to your page templates and 
scripts in the REQUEST object.

At the end of your login script you would typically redirect to some 
specific page like this:

return context.REQUEST.RESPONSE.redirect('aURL')
in exUserFolder you don't have to do anything else - the login works by 
magic, which is very confusing.

Now for the problems:
If the login is wrong the system will call /standard_error_message, so 
you have to customise that to send the user back to the login form with 
a Login failed message.

If the user bookmarks a protected page and tries to jump to it without 
being logged in, the system will call the login sequence starting in 
acl_users, so you have to customise that to call your own login page.

After the user has logged in, whenever you need to get the Username you 
would typically use a python script like this:

from AccessControl import getSecurityManager
return getSecurityManager().getUser().getUserName()
HTH
Cliff
prabuddha ray wrote:
Its been very kind of u all to be critical  about a newbie like me.
I'll definitely lookout for those ettiquetes.
My python script error got solved as i missed the silly ' ' in the
response.redirect statemnet.
I set the user and pwd request vars in sesson var.
Tried cookie crumbler and MysqlUserFolder and UserFolder also but they
all need to changed much and my requirements are diffrent.
I'm building a trial govt. site for stores management which was built
previously in ASP.
The login page takes the districtname , username and passwd .
according to the type of user different menus are displayed.
For this i need to have the  districtname , username and passwd 
carried on throughout the session.

my current requirement is to pass the session vars through the python
script which is the action of the login form.
I've gone through the zopebook but dint find much help there.
can u plz tell me where do i get to know about pythopn scripting done
in zope n ZPT examples.
i'm really sorry for my erronous language. please dont overlook theese
humble requests.
On Fri, 1 Apr 2005 23:07:38 +0200, Dieter Maurer [EMAIL PROTECTED] wrote:
prabuddha ray wrote at 2005-3-30 23:50 -0800:
...
now my problem how n where do i check d pwd n redirect to the next zpt
or the previous one if its wrong.
Apparently, you need some background reading...
Especially, you need to understand that HTTP is a stateless
protocol and *EACH* request must somehow perform its own
authentication. That's why usually login information is
(somehow) coded in a cookie.
You really should follow the advice to look at an existing
UserFolder (they are responsible for authentication).
You may need to adapt/extend an existing UserFolder.
--
Dieter

___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-03 Thread Dieter Maurer
prabuddha ray wrote at 2005-4-2 04:38 -0800:
 ...
I've gone through the zopebook but dint find much help there.

can u plz tell me where do i get to know about pythopn scripting done
in zope n ZPT examples.

The Zope Book (2.7 edition, online) definitely gives help
on python scripting -- retry please.

You find ZPT examples in the examples folder of
.../Products/PageTemplates. Import the zpt_examples.zexp into
Zope (import/export).

Of course, no general ressource provides direct answers
to your very specific problems...

-- 
Dieter
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-02 Thread Cliff Ford
Customisation of the login sequence is quite difficult for Newbies 
because there are lots of different ways to approach the problem - you 
have already tried some. I suspect that trying to match what was done in 
PHP may be part of your problem. It would be helpful to know if your 
lists of users are coming from one source, like a database table, or
multiple sources, like multiple tables or different databases, and 
whether users are unique in each district. From there you decide your 
zope folder structure. It could be like this:

site_home
|__acl_users
|__district1
|__district2
or like this:
site_home
|__district1
||__acl_users
|__district2
||__acl_users
In the second case you would not have to worry about asking the user for 
the district name. In the first case you would get a district name or a 
user defined role for that district from a supplementary data source, 
like a database. A combination of exUserFolder and MySQL would do.

You can get information on the logged in user (Username and Roles) from 
the User object, so you don't need to expicitly use sessions at this 
stage. You should certainly not store passwords - that would be a 
serious breach of confidentiality.

Maybe you should say what you do with the District parameter after the 
user has logged in. Giving advice or examples on ZPT and Python for an 
approach that is probably wrong is just too time-consuming.

Cliff
prabuddha ray wrote:
Its been very kind of u all to be critical  about a newbie like me.
I'll definitely lookout for those ettiquetes.
My python script error got solved as i missed the silly ' ' in the
response.redirect statemnet.
I set the user and pwd request vars in sesson var.
Tried cookie crumbler and MysqlUserFolder and UserFolder also but they
all need to changed much and my requirements are diffrent.
I'm building a trial govt. site for stores management which was built
previously in ASP.
The login page takes the districtname , username and passwd .
according to the type of user different menus are displayed.
For this i need to have the  districtname , username and passwd 
carried on throughout the session.

my current requirement is to pass the session vars through the python
script which is the action of the login form.
I've gone through the zopebook but dint find much help there.
can u plz tell me where do i get to know about pythopn scripting done
in zope n ZPT examples.
i'm really sorry for my erronous language. please dont overlook theese
humble requests.
On Fri, 1 Apr 2005 23:07:38 +0200, Dieter Maurer [EMAIL PROTECTED] wrote:
prabuddha ray wrote at 2005-3-30 23:50 -0800:
...
now my problem how n where do i check d pwd n redirect to the next zpt
or the previous one if its wrong.
Apparently, you need some background reading...
Especially, you need to understand that HTTP is a stateless
protocol and *EACH* request must somehow perform its own
authentication. That's why usually login information is
(somehow) coded in a cookie.
You really should follow the advice to look at an existing
UserFolder (they are responsible for authentication).
You may need to adapt/extend an existing UserFolder.
--
Dieter

___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-04-01 Thread Dieter Maurer
prabuddha ray wrote at 2005-3-30 23:50 -0800:
 ...
now my problem how n where do i check d pwd n redirect to the next zpt
or the previous one if its wrong.

Apparently, you need some background reading...

Especially, you need to understand that HTTP is a stateless
protocol and *EACH* request must somehow perform its own
authentication. That's why usually login information is
(somehow) coded in a cookie.

You really should follow the advice to look at an existing
UserFolder (they are responsible for authentication).
You may need to adapt/extend an existing UserFolder.


-- 
Dieter
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-03-31 Thread Chris Withers
prabuddha ray wrote:
now my problem how n where do i check d pwd n redirect to the next zpt
or the previous one if its wrong.
i've a zsql method giving me the pwd for the user param passed.
i wanted to kno if i can call this method on d onsubmit event?
kindly gimme solns u've in mind.
Use SimpleUserFolder and CookieCrumbler, and cut out the cute 
abbreviations like n and d while you're at it.

Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-03-31 Thread Chris Withers
Somhorst JJT wrote:
You could try to look at the tutorial on devshed.com. They created a login
system using text files. Its not exactly 
as you want but it gives you an idea about how to handle things :) 
Talk about re-inventing wheels. Zope has an amazingly powerful and 
flexible security architecture. Why on earth would you want to start 
again from scratch?

cheers,
Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-03-31 Thread Cliff Ford
 Use SimpleUserFolder and CookieCrumbler, and cut out the cute
 abbreviations like n and d while you're at it.
I second that! I have started hitting the delete button rather than 
engage in the mental translation.

Cliff
Chris Withers wrote:
prabuddha ray wrote:
now my problem how n where do i check d pwd n redirect to the next zpt
or the previous one if its wrong.
i've a zsql method giving me the pwd for the user param passed.
i wanted to kno if i can call this method on d onsubmit event?
kindly gimme solns u've in mind.

Use SimpleUserFolder and CookieCrumbler, and cut out the cute 
abbreviations like n and d while you're at it.

Chris
___
Zope maillist  -  Zope@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 )


Re: [Zope] Re: login page problem

2005-03-31 Thread Chris Withers
Cliff Ford wrote:
  Use SimpleUserFolder and CookieCrumbler, and cut out the cute
  abbreviations like n and d while you're at it.
I second that! I have started hitting the delete button rather than 
engage in the mental translation.
I gave up and added ray to my spam can procmail rule. Oh well, no more 
for me ot read I guess ;-)

Chris
--
Simplistix - Content Management, Zope  Python Consulting
   - http://www.simplistix.co.uk
___
Zope maillist  -  Zope@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 )


RE: [Zope] Re: login page problem

2005-03-30 Thread Somhorst JJT

You could try to look at the tutorial on devshed.com. They created a login
system using text files. Its not exactly 
as you want but it gives you an idea about how to handle things :) 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
prabuddha ray
Sent: donderdag 31 maart 2005 9:50
To: zope@zope.org
Subject: [Zope] Re: login page problem


thnx dieter n chris,
i cudnt make my point clear.
1st a recap : i've a zpt login page wherein i have got the district
name n coressponding users drop down list built.
now after selecting d district n username d passwd is to b filled.
then d form is to b submitted. 
It has to be done thid way only so i cant hav cookie crumblers n
simpleuserfolder componenets.

now my problem how n where do i check d pwd n redirect to the next zpt
or the previous one if its wrong.
i've a zsql method giving me the pwd for the user param passed.
i wanted to kno if i can call this method on d onsubmit event?
kindly gimme solns u've in mind.




On Wed, 30 Mar 2005 20:01:24 +0200, Dieter Maurer [EMAIL PROTECTED]
wrote:
 prabuddha ray wrote at 2005-3-29 01:57 -0800:
 I'm creatin a customised login page template using districtname, user
 name and password.
 i got halt in d logic for password checking. 
 after submitting d login form how do i call d same page if the passwd
 is wrong along with d req params passed? do i need an ext python
 script for this redirection.
 
 No, you can do it where you checked the password.
 
 also tell how to set session data in ZPTs from the form fields?
 
   tal: define=dummy python:request.SESSION.set(mySessionVar,
 request.someRequestVar) /
 
 -- 
 Dieter
 

-- 
Share the vision of difference with ME
___
Zope maillist  -  Zope@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 )

___
Zope maillist  -  Zope@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 )