def testAcquisition(self): plugin = self.portal.acl_users.membrane_users adder = getCurrentUserAdder(plugin) # We should have request self.failIf(getattr(aq_inner(adder), 'REQUEST', None) is None) # Our parent should be the plugin self.failUnless(aq_parent(adder) is plugin)
def doAddUser(self, login, password): """ This is highly usecase dependent, so it delegates to a local utility """ adder = getCurrentUserAdder(self) if adder is not None: adder.addUser(login, password) return True else: return False
def doAddUser(self, login, password): """ This is highly usecase dependent, so it delegates to a local utility """ adder = getCurrentUserAdder(self) if adder is not None: adder.addUser(login, password) return True else: raise(NotImplemented, "IUserAdder utility not available")