Hello, maybe I'm on the way against the zope internal philosophy ... We use a postgresql Database and MS Access :( as frontends. Now we would like to use zope as frontend and skip Access. The Access applications are quit simple but depents on a rather complex permission structure, realized in postgresql. Now to zope ----------- One way is to create a zope connection with the highest access permissions on the database. Now if a user logged in, a script checked out what the user is allowed to do (maybe with complex SQL statements and special database rows). :( In my opinion a better way would be: A user logged in and then the database connection would be established, with the username/password and of course the right database permissions. This connection should be open until the user logout. :) I haven't found any hind on this kind of connection. (Late database connection) In general, is it possible to do it? Must it realized it completely in a extra phyton script? (sounds complicated) Or is there maybe any example, which I had not found? o) Thank's for any help! best regards, Ralf Duda
Ralf Duda writes:
.... A user logged in and then the database connection would be established, with the username/password and of course the right database permissions. This connection should be open until the user logout. :)
I haven't found any hind on this kind of connection. (Late database connection) In general, is it possible to do it? There are several reasons why this is not standard:
* opening a connection is expensive you may not want it for each user. Note that connections are thread-local objects. Therefore, each thread will have such a connectioon (at least in the worst case). * It is unclear when a user logs out (he may never do this explicitely; just switches off the computer, logs in again
Must it realized it completely in a extra phyton script? (sounds complicated) I fear so: an External Method or a Python Product.
Dieter
participants (2)
-
Dieter Maurer -
Ralf Duda