Re: [Zope] Dynamically Picking which object to display

2000-06-09 Thread Graham Chiu

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

In article <[EMAIL PROTECTED]>, Jason Lee  writes
>a particular object based on a value.  For example, let's say a user tries to
>access www.foo.com/MyAccount/CCInfo.  If the user has authenticated, I need to
>show him the obviously sensitive data he has requested.  If he is not
>authenticated, however, I need to give him a login screen which, for argument's
>sake, is in the DTML document Login in the root folder.  How would I go about
>doing that?  Am I making sense?  Thanks...

This is what I do:

CCInfo
  if user has a valid sessionid and has logged in
display the information
  else
redirect to login screen
login screen redirects back to CCInfo on successful login
  endif

Working examples at my auction site ( the php script just redirects to
my Zope based auction site )

http://www.compkarori.co.nz/auctions.php
- -- 
Regards,  Graham Chiu
gchiucompkarori.co.nz
http://www.compkarori.co.nz/index.php
Powered by Interbase and Zope

-BEGIN PGP SIGNATURE-
Version: PGPsdk version 1.7.1

iQA/AwUBOUC0crTRdIWzaLpMEQJJUgCg/zVzA+fisMQRtk1SJfaGv63q6sEAoKCk
8M1Tnvzx1vjNT0Nv2X7YrG0e
=pKW1
-END PGP SIGNATURE-

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Dynamically Picking which object to display

2000-06-09 Thread Tino Wildenhain

Hi Jason,

Jason Lee wrote:
> 
> I'm fairly new to Zope, so this may be a dumb question, and my vocabulary could
> be wrong, so please bear with me.
> 
> I'm in the middle of building an e-commerce solution for my company, and we're
> evaluating Zope (and PHP and Servlets, but that's immaterial) as the platform on
> which to base this solution.  That doesn't necessarily mean anything other than
> to give you context.  One of the problems I'm facing right now is how to display
> a particular object based on a value.  For example, let's say a user tries to
> access www.foo.com/MyAccount/CCInfo.  If the user has authenticated, I need to
> show him the obviously sensitive data he has requested.  If he is not
> authenticated, however, I need to give him a login screen which, for argument's
> sake, is in the DTML document Login in the root folder.  How would I go about
> doing that?  Am I making sense?  Thanks...

We have done it for an (closed to the public) e-commerce solution which 
could not be done with http-authentication (we have 2 user-names and one
password for authentication for historical reasons)
Se we needed a solution and found it as a simple solution with the
standard
header of all documents wich include some kind of session-management
down
the protected path. If the user is authenticated, the session management
keeps
track of it and provides useful data to all pages where it is included.
If the session is timed out or a not authenticated user tries to access
some
pages, the session-management (a dtml-method) sends a redirect to 
the login-page.

I can give a more detailed description on request. 

But at least: yes, you can do it; yes, it makes sense

HTH
Tino Wildenhain

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Dynamically Picking which object to display

2000-06-07 Thread Kevin Dangoor

- Original Message -
From: "Jason Lee" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 07, 2000 3:50 PM
Subject: [Zope] Dynamically Picking which object to display


> I'm fairly new to Zope, so this may be a dumb question, and my vocabulary
could
> be wrong, so please bear with me.
>
> I'm in the middle of building an e-commerce solution for my company, and
we're
> evaluating Zope (and PHP and Servlets, but that's immaterial) as the
platform on
> which to base this solution.  That doesn't necessarily mean anything other
than
> to give you context.  One of the problems I'm facing right now is how to
display
> a particular object based on a value.  For example, let's say a user tries
to
> access www.foo.com/MyAccount/CCInfo.  If the user has authenticated, I
need to
> show him the obviously sensitive data he has requested.  If he is not
> authenticated, however, I need to give him a login screen which, for
argument's
> sake, is in the DTML document Login in the root folder.  How would I go
about
> doing that?  Am I making sense?  Thanks...

You're asking quite a reasonable question. If you use one of the alternate
authentication systems (like LoginManager or Generic User Folder), you can
make a login scheme that uses cookies with a custom login screen. I'm hoping
to soon have a package that works with LoginManager to be a little more plug
and play.

The way it works is pretty straightforward. You just set the permissions
such that the user would have to authenticate in order to view that data.
Zope's authentication machinery will kick in, and LoginManager would then
put your login screen up.

Kevin


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




[Zope] Dynamically Picking which object to display

2000-06-07 Thread Jason Lee

I'm fairly new to Zope, so this may be a dumb question, and my vocabulary could
be wrong, so please bear with me.  

I'm in the middle of building an e-commerce solution for my company, and we're
evaluating Zope (and PHP and Servlets, but that's immaterial) as the platform on
which to base this solution.  That doesn't necessarily mean anything other than
to give you context.  One of the problems I'm facing right now is how to display
a particular object based on a value.  For example, let's say a user tries to
access www.foo.com/MyAccount/CCInfo.  If the user has authenticated, I need to
show him the obviously sensitive data he has requested.  If he is not
authenticated, however, I need to give him a login screen which, for argument's
sake, is in the DTML document Login in the root folder.  How would I go about
doing that?  Am I making sense?  Thanks...

-- 
Jason Lee  | My German is as good as my jujitsu, which is to say, 
Programmer/Analyst | "I don't know German." -- Tycho Brahe

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )