Show
Ignore:
Timestamp:
10/06/03 16:42:36 (21 years ago)
Author:
jalet
Message:

LDAP group access will be slower when cache is disabled, but at least code
is consistent with the rest of the caching mechanis, but at least code
is consistent with the rest of the caching mechanism

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/ldapstorage.py

    r1137 r1141  
    2121# 
    2222# $Log$ 
     23# Revision 1.30  2003/10/06 14:42:36  jalet 
     24# LDAP group access will be slower when cache is disabled, but at least code 
     25# is consistent with the rest of the caching mechanis, but at least code 
     26# is consistent with the rest of the caching mechanism 
     27# 
    2328# Revision 1.29  2003/10/06 13:12:28  jalet 
    2429# More work on caching 
     
    348353                grouppquota.PageCounter = 0 
    349354                grouppquota.LifePageCounter = 0 
    350                 usernamesfilter = "".join(["(pykotaUserName=%s)" % member.Name for member in group.Members]) 
     355                usernamesfilter = "".join(["(pykotaUserName=%s)" % member.Name for member in self.getGroupMembers(group)]) 
    351356                result = self.doSearch("(&(objectClass=pykotaUserPQuota)(pykotaPrinterName=%s)(|%s))" % (printer.Name, usernamesfilter), ["pykotaPageCounter", "pykotaLifePageCounter"], base=self.info["userquotabase"]) 
    352357                if result : 
     
    536541    def addUserToGroup(self, user, group) :     
    537542        """Adds an user to a group.""" 
    538         if user.Name not in [u.Name for u in group.Members] : 
     543        if user.Name not in [u.Name for u in self.getGroupMembers(group)] : 
    539544            result = self.doSearch("objectClass=pykotaGroup", None, base=group.ident, scope=ldap.SCOPE_BASE)     
    540545            if result :