[ic] password protection of categories

Chris Rapier rapier@psc.edu
Wed, 21 Feb 2001 16:01:37 -0500

johny brabo wrote:
> This seems a nice suggestion, thanks.
> But problem here is that this would only translate the
> problem. I could show the category only to users that
> have the required field in their userdb, but then I
> have to figure out a way to password-protect them from
> adding this field.
> Any user should be able to get access if they have the
> password. So I think I need a way to check if a user
> has allready entered a password, and otherwise serve a
> login-form if they click the category. Note that I'm
> not talking about the user's login name/password.

How about this...

You have users pick items that go into their own special catalog. You
can do this by extending the user database to include product number
specific to that user or create a new table keyed on the user name which
contains catalog information. Now, when the user logs in with their
password (you can check this easily - in mv it was mv_login I'm guessing
its ic_login now if its true then do this if not bounce them to a login
page) it reads this table and builds a catalog specifically from those
items. Anything you can do in the main catalog you'd be able to do in
this one. Its pretty easy actually once you start using fields from the
user catalog as keys in the main product catalog. 

People wouldn't be able to view this user catalog without knowing the
proper login name and password which would thus protect it. Whats even
cooler is that if the row keyed on the user name is defined in the user
catalog datebase then it will display products. If not then it will
display account information (address, billing, past orders and so forth)
or some such thing like that. That way people can create a public
catalog and a private account. You can also make it so that they can't
create a public catalog without filling in all of the necessary account
information by burying that process in the private account page. 

I hope some of this makes sense. I'm being a little disjointed with my

I've actually implemented a lot of this stuff in minivend. It not a
difficult task once you really wrap your head around the way you
actually access tables. You'll need to drop into perl for some of this
but nothing major.

Good luck.