this is weird, I am using the very same method in another product with no issues; the only difference is in config.py:

from Products.CMFCore.CMFCorePermissions import AddPortalContent
ADD_CONTENT_PERMISSION = AddPortalContent

adding self.setRoles to the method doesn't fix it:

class TestUninstall(ATGoogleVideoTestCase):

    def afterSetUp(self):
        self.qitool = self.portal.portal_quickinstaller
        self.qitool.uninstallProducts(products=[PROJECTNAME])
        self.setRoles(['Manager'])

    def testProductUninstalled(self):
        """test if the product was uninstalled"""
        self.failIf(self.qitool.isProductInstalled(PROJECTNAME))


fails with "Unauthorized: Do not have permissions to remove this object"

saludos

Stefan H. Holek wrote:
The test user only has the Member role by default. If you need manager privs you have to call e.g. self.setRoles(['Manager'])


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

Reply via email to