[Zope] Re: manage_changePermissions from Script(Python)

Lee Harr missive@hotmail.com
Fri, 10 Jan 2003 19:58:45 +0000


>You are using Zope 2.3.x, right? Just a quick reminder to mention that in 
>inquiries to this list, because it is quite old and could cause confusion 
>if people try to reproduce your problem - I wasn't mislead, this is just a 
>general remark.
>

2.4.2, actually. You're right, I should have mentioned that
*much* earlier.


>About your other problem, before pasting an object into a container, it is 
>tested if you are allowed to add an object of this metatype to that 
>container, and in your case zope thinks you aren't allowed to do that.
>That causes an error. To test it, just give the non-manager user (or 
>anonymous) permission to add a folder into your target folder and try 
>again. As I understand what you want to do, giving appropriate writing 
>permissions to your "people" in their folder might be the right thing to do 
>anyway.
>

Hmm.. maybe. But I don't want non-managers to be able to add just
any folder there, I only want them to be able to add a folder
that was created by this particular script. (ie, one that has
the right name, and has had its permissions properly set up)

What I really should do is create a Product, but this seemed so
simple to start off that I figured I would just hack it in this
way.... Live & learn....


>
>I think my memories faulted me and that Owner thing was not what solved our 
>copy&paste problem.

It wasn't. I mentioned on the other thread that I found that my
user had never had the "Owner" role set at all (been using Zope
for 2 years now, so it must not be very important?) Once I set
that, I was able to proxy as Owner, but the script still did
not work right.

I believe it is either a bug, or else the way things are supposed
to work with manage_clone.

>
>About manage_changePermissions, I think you should use this method:
>
>def manage_permission(self, permission_to_manage,
>                           roles=[], acquire=0, REQUEST=None)


That is the one!

Gets me where I was going.

Thank you so much for your help today.

Lee Harr


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963