In case anyone is interested, using the python code below won't copy the file unless the "View" Security permission on "login_html" is turned on for Anonymous... Then to protect the page from other Anonymous visitors, I have to manually turn off the "View" Security settings of "login_html" after it's copied into the user folder.
What a pain, anyone got a better way with some code? Thanks for reading! Kevin -----Original Message----- From: [EMAIL PROTECTED] Sent: Aug 3, 2005 9:21 PM To: zope@zope.org Subject: [Zope] Installation of login_html Fails 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) _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev ) _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )