[Zope] Need help with evaluation issues of Zope

Michel Pelletier michel@digicool.com
Wed, 5 Jan 2000 12:48:54 -0500


> -----Original Message-----
> From: Peter.Rupp@ual.com [mailto:Peter.Rupp@ual.com]
> Sent: Wednesday, January 05, 2000 12:08 PM
> To: zope@zope.org
> Subject: [Zope] Need help with evaluation issues of Zope
> 
> 
> 
> 1) Potential bug?  I compiled Zope on an intel machine 
> running Solaris 
> 2.7 (using gcc 2.8.1) and Python 1.5.2 (latest). I started 
> Zope (using 
> Zope's bundled web server) and followed the tutorial in building a 
> fictious web site.  After adding various users/passwords to the 
> user-acl folder (which existed under the web site's high 
> level folder), 
> I restarted another netscape browser to see if I could login 
> to manage 
> the site as one of the aformentioned users....Zope would not let me 
> login as the new added users, but I could login as superuser.   Next, 
> thinking that that perhaps Zope was one of those products that had to 
> be restarted to see the new userid's, I attempted to restart 
> zope from 
> the management "control-panel" page.  It appears that Zope does 
> restart, but.....you cannot access the Zope web site anymore....Zope 
> puts up a page saying something to the effect "it tried to perform IO 
> on a closed file", then a long list of trace messages.   Also, in the 
> xterm window where I started Zope, a message pops up (STDERR) saying 
> that it cannot write to some file, then prints what appear to 
> be octal 
> zeros \000\000\000. 
> 
> Unfortunately, I don't have the specifics with me (I can send that 
> along if you want).   Any ideas here?  The remote management 
> ability of 
> Zope is stated as a feature, but it concerns me that this simple 
> operation fails miserably.  

I suspect this is not a Zope bug because no one else is reporting it,
and I cannot reproduct it on Linux or SPARC solaris.  It is probably
something to do with your setup.

You're not storing the Data.fs file on an NFS partition are you?  That
would be BAAAAAAAAD.

> 
> 2)  I think the tutorial is excellent, but it doesn't go into 
> the exact 
> meaning(s) of "a Zope user" and what the ACL list is for.  This is 
> something I really need help understanding.   To me, "user" 
> could mean 
> the following things:
>     a) A "site administrator" user...that is I have the ability to go 
> through a backdoor at the web-site and perform administrative 
> operations....whereby I would login at some point?

Yes, this is a Zope user.  It typically has the "Manager" role but you
can create new roles for different 'kinds' of manager that you want.

>     b) A "web surfer" (who really isn't authenticated as a 
> "user") who 
> visits the site looking for some information that's made 
> public via the 
> web site.  I'm guessing here, but that at some point, administrative 
> users come in this way, then when traveling to a different folder 
> within the site, are eventually asked to login?

This is also a Zope user called "Anonymous User"  it has the "Anonymous"
Role.

>     c)  A "paid subscription" user, who after logging in, has 
> access to 
> his separate area and can see specific web pages on the site?

This is like any other user, it just has a special role you create.  It
could be the "Paid Subscriber" role, if you want.  

> These concepts are not very clear from the doc, and would appreciate 
> any help understanding Zope's meaning of the word "user".

Zope has Users, Roles and Permissions.  Users have Roles, and various
Roles have Permissions mapped to them.  At any time a User is allowed to
do anything that the union of the permissions of their roles allows them
to do.

Using your example, you can create a "Subscriber" role that has more
permissions than "Anonymous" does.  When someone gives you money, you
give them the Subscriber role and voila, they are allowed to do things
that only Subscribers can do, because they have the role.

BTW, in DTML you can access the current user object with 
<dtml-var AUTHENTICATED_USER>.

> 3) I'm running Oracle 7.3.2 on the same server that Zope's 
> intalled...but I couldn't seem to find information on how to 
> connect to 
> an Oracle database.  My goal was to run a simple query 
> against a system 
> table, and display the results.   The ZSQL guide guides you through a 
> "Gadfly" database connection, but I couldn't find anything that would 
> connect me to Oracle.  Is there something basic that I have 
> missed here?

No, you need to use DCOracle and the Oracle Database Adapter.  Many of
our customers use Oracle and Zope quite extensivly.

Gadfly is a free, simple, lightweight relational database written in
Python.

> 4) Does Zope have the capability of aiding the cgi-script programming 
> effort for populating a database?  I would like to put up a 
> form, have 
> the user input some items, and have these items *inserted* into an 
> Oracle database.  Is this feasable, or do I have to write my own 
> cgi-interface?  Speaking of cgi, is the only way to run a cgi-script 
> from within Zope by creating an external Python method that 
> ultimately 
> calls the "system" module?  

No, you don't need to write your own CGI interface, in fact Zope removes
all need to ever think about CGI again.  I haven't messed with it for
years.

Read Jeffrey's HowTo on using relational databases.

http://www.zope.org/Members/jshell/ZSQLMethods-InsertingData

Further, there is gobs of documentation on this.  Go to
http://www.zope.org/ and type 'ZSQL' into the "Search" box.

-Michel