Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
 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
Ejemplo n.º 5
0
 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")