Пример #1
0
    def __call__(self):
        if IRepositoryFolderSchema.providedBy(self.context):
            deleter = RepositoryDeleter(self.context)
            return deleter.is_deletion_allowed()

        return False
 def test_factory(self):
     fti = queryUtility(IDexterityFTI,
                        name='opengever.repository.repositoryfolder')
     factory = fti.factory
     new_object = createObject(factory)
     self.failUnless(IRepositoryFolderSchema.providedBy(new_object))
 def test_adding(self):
     self.grant('Reviewer', 'Manager')
     self.portal.invokeFactory('opengever.repository.repositoryfolder',
                               'repository1')
     r1 = self.portal['repository1']
     self.failUnless(IRepositoryFolderSchema.providedBy(r1))
 def test_factory(self):
     fti = queryUtility(IDexterityFTI, name='opengever.repository.repositoryfolder')
     factory = fti.factory
     new_object = createObject(factory)
     self.failUnless(IRepositoryFolderSchema.providedBy(new_object))
 def test_adding(self):
     self.grant('Reviewer', 'Manager')
     self.portal.invokeFactory('opengever.repository.repositoryfolder', 'repository1')
     r1 = self.portal['repository1']
     self.failUnless(IRepositoryFolderSchema.providedBy(r1))
Пример #6
0
    def render(self):
        if IRepositoryFolderSchema.providedBy(self.context):
            deleter = RepositoryDeleter(self.context)
            return deleter.is_deletion_allowed()

        return False