Héctor Velarde, on 2007-05-28:
>> Try putting this line right before the uninstallProducts line and see
>> if that helps.
>
> ups, sorry... last week was really a long one :-p
>
> may I ask about permissions? I have another product and I can remove the 
> product without declaring user as 'Manager'; as I mentioned before, the 
> only difference I found is the lack of the following lines:
>
> from Products.CMFCore.CMFCorePermissions import AddPortalContent
> ADD_CONTENT_PERMISSION = AddPortalContent
>
> thanks again!

I have not spent much time in that part of CMF/Plone code, but I can
say the following.

Normally the test_user in Zope/PloneTestCase should try to add content
to 'folder', which is his own Member folder, in which I would expect
him to have more rights then in the main portal folder.  So maybe your
two products differ in where the test user tries to add content?

Also look in ./CMFCore/permissions.py:

    security.declarePublic('AddPortalContent')
    AddPortalContent = 'Add portal content'
    setDefaultRoles(AddPortalContent, ('Owner','Manager',))

So it looks like Members cannot add content unless they are Owner or
Manager of some part of the site.

And I think the extra two lines that your other product have are
needed because without them this permission defaults to giving only
the Manager that permission.

-- 
Maurits van Rees | http://maurits.vanrees.org/ [NL]
            Work | http://zestsoftware.nl/
"Do not worry about your difficulties in computers,
 I can assure you mine are still greater."


_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers

Reply via email to