[Zope] Installation of login_html Fails

ktmi at earthlink.net ktmi at earthlink.net
Wed Aug 3 23:21:40 EDT 2005


Greetings, All-

(thanks for all the help and tips from the list in the past...)

The setup:
I have created an internal web site that allows people in my organization to add and edit their own personal page.  The problem is in installing into their folder (containing index_html, etc.) a login script (login_html) *programatically.*

The steps:
1.  Users create their personal folder and login userid and password as Anonymous Users as a role named "Friends." An "acl_users" user folder correctly installs.
2.  A login_html method should then be automatically installed to the folder, in addition to a boilerplate "index_html" (this is installed correctly).
3.  The index_html file acquires property values and other objects from the user entered information.
4.  If the user wants to edit their page, they click "Edit," which should call "login_html."  They enter their userid and pwd and editing is permissible.

The problem is #2:
I cannot figure out what permissions to give folders/objects that will allow Zope to add the login-html file programatically.  (The above steps work perfect for the "Manager" role.)  A login screen appears that refuses to accept any userid and pwd (except my "Manager" role's), the error message is:
 "Error Type: Unauthorized
Error Value: You are not allowed to access login_html in this context

Here is the python code called to add the boilerplate login_html to the newly created folder:
****************************
     id=userid
     doc = getattr(personal_folder,id)
     copy_info = container.personnel.personnel_temp.manage_copyObjects('index_html')
     doc.manage_pasteObjects(copy_info)

     copy_info = container.personnel.personnel_temp.manage_copyObjects('login_html')
     doc.manage_pasteObjects(copy_info)
****************************

I'm stumped, tried changing every permission can think of, doesn't work.  It all works fine other than this, and I really don't want to have to add the "login_html" file manually for hundreds of users...

Hope you all can make sense of this, and much thanks in advance for any ideas!!

Kevin (relative newbie)


More information about the Zope mailing list