]> git.ipfire.org Git - ipfire.org.git/commitdiff
people: List all users
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 15 Oct 2018 11:32:45 +0000 (12:32 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 15 Oct 2018 11:32:45 +0000 (12:32 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/talk.py
src/web/people.py

index 7ebeb04dabe8c75fef592f0d67b3c232e6e7f73c..ab07b436f4b35ea70da403983c170e2463ab3b30 100644 (file)
@@ -246,25 +246,6 @@ class Talk(Object):
                # Connect to FreeSWITCH
                self.freeswitch = Freeswitch(self.backend)
 
-       @property
-       def accounts(self):
-               for account in self.backend.accounts:
-                       if not account.is_talk_enabled():
-                               continue
-
-                       yield account
-
-       def search(self, query):
-               accounts = []
-
-               for account in self.backend.accounts.search(query):
-                       if not account.is_talk_enabled():
-                               continue
-
-                       accounts.append(account)
-
-               return accounts
-
        # Conferences
 
        @property
index face462cf202ba0a533512488cd2f13bf55557e0..23339daa4c480fb7a9a30b1476caff5b3db0da47 100644 (file)
@@ -75,7 +75,7 @@ class SearchHandler(base.BaseHandler):
                q = self.get_argument("q")
 
                # Perform the search
-               accounts = self.backend.talk.search(q)
+               accounts = self.backend.accounts.search(q)
 
                # Redirect when only one result was found
                if len(accounts) == 1:
@@ -104,7 +104,7 @@ class UserHandler(base.BaseHandler):
 class AccountsListModule(ui_modules.UIModule):
        def render(self, accounts=None):
                if accounts is None:
-                       accounts = self.backend.talk.accounts
+                       accounts = self.backend.accounts
 
                return self.render_string("people/modules/accounts-list.html", accounts=accounts)