I'm trying to roll out Zope for wide usage and one of the things users want already is a command line interface to Zope. At first, I thought that it was a silly request, but the more I think about it, the more I like it. In order to provide this, I need a way to run Python such that it connects to the ZODB (perhaps requiring ZEO?) and gives the user access to the database only as a specified user (with the option of manually authenticating to receive additional roles). Is this easy to do? Has it already been done? I read about importing Persistence and ZODB, but I'm clueless about setting up a user's environment in Python. Any pointers to appropriate documentation will be greatly appreciated. Thank you. --kyler
On Thu, Feb 15, 2001 at 09:08:49AM -0500, Kyler B. Laird wrote:
I'm trying to roll out Zope for wide usage and one of the things users want already is a command line interface to Zope. At first, I thought that it was a silly request, but the more I think about it, the more I like it.
In order to provide this, I need a way to run Python such that it connects to the ZODB (perhaps requiring ZEO?) and gives the user access to the database only as a specified user (with the option of manually authenticating to receive additional roles).
Is this easy to do? Has it already been done?
ZPublisher.Client is perfect to build python apps which interact with a Zope server. Naturally, ZPublisher.Client uses Zope security infrastructure. If you need _direct_ _interactive_ access to a Zope server, you can use the Medusa monitor service to connect to your ZServer and access it like a python interpreter. I don't know if you can restrict the access to the Medusa monitor, IIRC it asks you for your superuser password by default. -- Roberto Lupi
You can also start here: cd to your Zope dir's lib/python start python
import Zope app = Zope.app() app.acl_users <User Folder at 819283>
... rinse, repeat. ----- Original Message ----- From: "Kyler B. Laird" <laird@ecn.purdue.edu> To: <zope@zope.org> Sent: Thursday, February 15, 2001 9:08 AM Subject: [Zope] command line Zope?
I'm trying to roll out Zope for wide usage and one of the things users want already is a command line interface to Zope. At first, I thought that it was a silly request, but the more I think about it, the more I like it.
In order to provide this, I need a way to run Python such that it connects to the ZODB (perhaps requiring ZEO?) and gives the user access to the database only as a specified user (with the option of manually authenticating to receive additional roles).
Is this easy to do? Has it already been done? I read about importing Persistence and ZODB, but I'm clueless about setting up a user's environment in Python.
Any pointers to appropriate documentation will be greatly appreciated.
Thank you.
--kyler
_______________________________________________ Zope maillist - Zope@zope.org 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 )
Chris McDonough wrote:
You can also start here:
cd to your Zope dir's lib/python start python
import Zope app = Zope.app() app.acl_users <User Folder at 819283>
I've seen this a few times... Is this safe to do, even in a non-ZEO situation? cheers, Chris
On Thu, Feb 15, 2001 at 02:58:55PM +0000, Chris Withers wrote:
Chris McDonough wrote:
You can also start here:
cd to your Zope dir's lib/python start python
import Zope app = Zope.app() app.acl_users <User Folder at 819283>
I've seen this a few times...
Is this safe to do, even in a non-ZEO situation?
In non-ZEO situations you can do the same with the Medusa Monitor; see doc/DEBUGGING.txt. -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ ---------------------------------------------
[Chris Withers] | I've seen this a few times... | | Is this safe to do, even in a non-ZEO situation? The Zope instance which you are connecting to has to be shut down.. Cheers, Morten
On Thu, 15 Feb 2001 09:53:02 -0500 you wrote:
You can also start here:
cd to your Zope dir's lib/python start python
import Zope app = Zope.app() app.acl_users <User Folder at 819283>
Ah ha! This is what I am seeking. Is it trivial to weld on user authentication and authorization like the FTP access module has? (It's not at all clear to me how I'd do it.) I need the entire environment to only allow the user to do things she can do through the HTTP interface. Thanks! --kyler
On Thu, 15 Feb 2001 09:53:02 -0500 you wrote:
You can also start here:
cd to your Zope dir's lib/python start python
import Zope app = Zope.app() app.acl_users <User Folder at 819283>
Ah ha! This is what I am seeking.
Is it trivial to weld on user authentication and authorization like the FTP access module has? (It's not at all clear to me how I'd do it.) I need the entire environment to only allow the user to do things she can do through the HTTP interface.
No, sorry, that's what the publishing machinery is for. ;-) It's not a trivial job.
[Kyler B. Laird] | In order to provide this, I need a way to run Python such that it | connects to the ZODB (perhaps requiring ZEO?) and gives the user | access to the database only as a specified user (with the option of | manually authenticating to receive additional roles). Yes, you can use XML-RPC¹. For superuser only usage, you also have the medusa debugger (or Zope monitor)². And you also have ZopeShell³. ¹ <URL:http://www.zope.org/Members/Amos/XML-RPC> ² <URL:http://www.zope.org/Members/teyc/howtoMonitorClient> ³ <URL:http://www.zope.org/Members/sf/zopeshell>
On 15 Feb 2001 16:17:30 +0100 you wrote:
[Kyler B. Laird]
| In order to provide this, I need a way to run Python such that it | connects to the ZODB (perhaps requiring ZEO?) and gives the user | access to the database only as a specified user (with the option of | manually authenticating to receive additional roles).
Yes, you can use XML-RPC¹.
O.k., this looks like a place to start. I'll look into it more. Thank you.
For superuser only usage, you also have the medusa debugger (or Zope monitor).
Yeah! That looks like what I want...but for all users, not just superuser.
And you also have ZopeShell³.
zopeshell is a shell-like utility to navigate in a Zope database, add folders, remove objects, and edit DTML documents and methods with your favorite Unix text editor. It appears that zopeshell is an editing environment, but I want to be able to interact with my objects through their methods. % python somewayofspecifyinguser Python 1.5.2 (#2, Aug 29 2000, 13:57:03) [C] on sunos5 Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam >>> Zope.people.kyler.test() 'This is a test.' Thank you for the help. If I don't find just what I need, I think I'm starting to see the pieces I need to glue together. --kyler
[Kyler B. Laird] | >For superuser only usage, you also have | >the medusa debugger (or Zope monitor). | | Yeah! That looks like what I want...but for all | users, not just superuser. Then I think you should look into XML-RPC. :)
| >For superuser only usage, you also have | >the medusa debugger (or Zope monitor). | | Yeah! That looks like what I want...but for all | users, not just superuser.
Then I think you should look into XML-RPC. :)
<shudder of enlightenment> This is *soooo* cool! I'm all over XML-RPC. It's the answer to lots of problems - even things I don't know I need yet. Mmmm... So, I'm playing with Meerkat and now I want to start using XML-RPC with Zope. It appears that the XML-RPC How To http://www.zope.org/Members/Amos/XML-RPC is a little out of date. Although I can use it against an old server, a request like http://newserver/objectIds where newserver is a 2.3.0 box, fails. This is even true for http://zope.org/objectIds Is there an updated XML-RPC How To? While this is not the "interactive Python session" that I thought I wanted, it's *great*! Thank you for the informative and speedy responses to my request for help. --kyler
Kyler B. Laird wrote:
So, I'm playing with Meerkat and now I want to start using XML-RPC with Zope. It appears that the XML-RPC How To http://www.zope.org/Members/Amos/XML-RPC is a little out of date. Although I can use it against an old server, a request like http://newserver/objectIds where newserver is a 2.3.0 box, fails. This is even true for http://zope.org/objectIds
Is there an updated XML-RPC How To?
You can no longer get objectIds (and objectValues) directly through url. You could try instead something like title_and_id http://newserver/someFolder/title_and_id -- Tom Jenkins devIS - Development InfoStructure http://www.devis.com <xml> Its whatever you need it to be </xml>
[Erik Enge] | ¹ <URL:http://www.zope.org/Members/Amos/XML-RPC> | ² <URL:http://www.zope.org/Members/teyc/howtoMonitorClient> | ³ <URL:http://www.zope.org/Members/sf/zopeshell> And lets not forget WebDAV, I guess that, with cadaver¹ and/or an editor could be used as a command line. ¹ <URL:http://www.webdav.org/cadaver/>
participants (8)
-
Chris McDonough -
Chris Withers -
Erik Enge -
Kyler B. Laird -
Martijn Pieters -
morten@esol.no -
Roberto Lupi -
Tom Jenkins