diff --git a/ldapcherry/__init__.py b/ldapcherry/__init__.py index 53ce65c..9962816 100644 --- a/ldapcherry/__init__.py +++ b/ldapcherry/__init__.py @@ -421,7 +421,9 @@ class LdapCherry(object): def searchuser(self, searchstring): """ search user page """ self._check_auth(must_admin=False) - pass + res = self._search(searchstring) + attrs_list = self.attributes.get_search_attributes() + return self.temp_searchuser.render(searchresult = res, attrs_list = attrs_list) @cherrypy.expose def searchadmin(self, searchstring=None): diff --git a/resources/templates/searchuser.tmpl b/resources/templates/searchuser.tmpl index 6bc875c..f9f7129 100644 --- a/resources/templates/searchuser.tmpl +++ b/resources/templates/searchuser.tmpl @@ -1,15 +1,55 @@ <%inherit file="navbar.tmpl"/> <%block name="core"> -
-
-
- -
+
+
+
+
+ + + + %for attr in attrs_list: + + % endfor + + + + %for user in searchresult: + + %for attr in attrs_list: + + % endfor + + % endfor + + + %for attr in attrs_list: + + % endfor + +
+ ${attrs_list[attr]} +
+ % if attr in searchresult[user]: + ${searchresult[user][attr]} + % endif +
+ ${attrs_list[attr]} +
+
+