[Zope] Updating Database Records

J Cameron Cooper jccooper@jcameroncooper.com
Fri, 07 Mar 2003 18:53:34 -0600


>
>
>Hello. Does anyone know whether a Z SQL method has the
>permission to make modifications to already existing
>data by using the SQL update command. I am calling a Z
>SQL method that attempts to do this from a DTML method
>that has a proxy role of 'manager'. However, when this
>Z SQL method is called, Zope flags me with an error
>saying that I am "Unauthorized". Now, when I call
>another Z SQL method from this same DTML method that
>inserts records into the same database, everything
>works fine. Is there some restriction against
>modifying database records in Zope? Any help would be
>greatly appreciated. Thanks.
>  
>
Zope doesn't really care about the contents of the SQL statement. The 
concepts of "insert" and "update" (and even "select") are entirely out 
of Zope's world. It is probably about permissions with the database user 
you have the ZSQL method logging in as. Can you do the same thing on the 
database console as the same user?

          --jcc