Changeset 1081
- Timestamp:
- 07/11/03 16:23:13 (21 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/ldapstorage.py
r1075 r1081 21 21 # 22 22 # $Log$ 23 # Revision 1.18 2003/07/11 14:23:13 jalet 24 # When adding an user only adds one object containing both the user and 25 # its account balance instead of two objects. 26 # 23 27 # Revision 1.17 2003/07/07 12:51:07 jalet 24 28 # Small fix … … 457 461 """Adds a user to the quota storage, returns it.""" 458 462 fields = { self.info["userrdn"] : user.Name, 459 "objectClass" : ["pykotaObject", "pykotaAccount" ],463 "objectClass" : ["pykotaObject", "pykotaAccount", "pykotaAccountBalance"], 460 464 "cn" : user.Name, 461 465 "pykotaUserName" : user.Name, 462 466 "pykotaLimitBY" : (user.LimitBy or "quota"), 463 }464 dn = "%s=%s,%s" % (self.info["userrdn"], user.Name, self.info["userbase"])465 self.doAdd(dn, fields)466 fields = {467 "objectClass" : ["pykotaObject", "pykotaAccountBalance"],468 "cn" : user.Name,469 "pykotaUserName" : user.Name,470 467 "pykotaBalance" : str(user.AccountBalance or 0.0), 471 468 "pykotaLifeTimePaid" : str(user.LifeTimePaid or 0.0), 472 469 } 473 dn = " cn=%s,%s" % (user.Name, self.info["balancebase"])470 dn = "%s=%s,%s" % (self.info["userrdn"], user.Name, self.info["userbase"]) 474 471 self.doAdd(dn, fields) 475 472 return self.getUser(user.Name)