def enableSyndication(self, obj):
     """
     Enable syndication for the obj
     """
     if not _checkPermission(ModifyPortalContent, obj):
         raise Unauthorized
     settings = IFeedSettings(obj)
     settings.enabled = True
 def afterSetUp(self):
     self.syndication = getToolByName(self.portal, 'portal_syndication')
     self.folder.invokeFactory('Document', 'doc1')
     self.folder.invokeFactory('Document', 'doc2')
     self.folder.invokeFactory('File', 'file')
     self.doc1 = self.folder.doc1
     self.doc2 = self.folder.doc2
     self.file = self.folder.file
     #Enable syndication on folder
     registry = getUtility(IRegistry)
     self.site_settings = registry.forInterface(ISiteSyndicationSettings)
     settings = IFeedSettings(self.folder)
     settings.enabled = True
     self.folder_settings = settings
 def disableSyndication(self, obj):
     if not _checkPermission(ModifyPortalContent, obj):
         raise Unauthorized
     settings = IFeedSettings(obj)
     settings.enabled = False