mango r245 - in branches/django: . mango
- From: ovitters svn gnome org
- To: svn-commits-list gnome org,gnome-sysadmin gnome org
- Subject: mango r245 - in branches/django: . mango
- Date: Mon, 23 Jun 2008 21:23:53 +0000 (UTC)
Author: ovitters
Date: Mon Jun 23 21:23:53 2008
New Revision: 245
URL: http://svn.gnome.org/viewvc/mango?rev=245&view=rev
Log:
* mango/models.py (LdapObject.search, Users.groups): Remove leftover
debug message. Further, optimize use of LDAP queries by only
requesting the cn of groups within the Users class.
Modified:
branches/django/ (props changed)
branches/django/ChangeLog
branches/django/mango/models.py
Modified: branches/django/mango/models.py
==============================================================================
--- branches/django/mango/models.py (original)
+++ branches/django/mango/models.py Mon Jun 23 21:23:53 2008
@@ -154,7 +154,7 @@
self.dn = dn
@classmethod
- def search(cls, filter=None):
+ def search(cls, filter=None, attrlist=None):
l = LdapUtil.singleton().handle
base = cls.BASEDN
@@ -170,8 +170,7 @@
ldapfilter = cls._build_filter(q_object)
else:
ldapfilter = '(objectClass=*)'
- print "ldapfilter: %s" % ldapfilter
- results = l.search_s(base, ldap.SCOPE_SUBTREE, ldapfilter, None)
+ results = l.search_s(base, ldap.SCOPE_SUBTREE, ldapfilter, attrlist)
items = []
@@ -223,7 +222,7 @@
@property
def groups(self):
if self._groups is None:
- self._groups = UserGroups.search(Q(memberUid=self.__dict__['uid']))
+ self._groups = UserGroups.search(Q(memberUid=self.__dict__['uid']), ('cn',))
return self._groups
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]