Exemplo n.º 1
0
 def list_branches(self):
     if not self.config.branches.enabled:
         yield error_log('Branches are not enabled on this LDAP')
     self.connect(auth=False)
     self.authenticate(
         username=self.config.admin_dn,
         password=self.config.admin_password
     )
     branches = self.get_branches()
     self.disconnect()
     yield return_value(branches)
Exemplo n.º 2
0
 def list_users(self, branch, filter):
     self.set_branch(branch)
     self.connect()
     users = self.get_users(filter=filter)
     self.disconnect()
     yield return_value(users)