Changeset 925 for pykota/trunk/pykota/storages/sql.py
- Timestamp:
- 04/16/03 10:53:14 (21 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/sql.py
r921 r925 21 21 # 22 22 # $Log$ 23 # Revision 1.26 2003/04/16 08:53:14 jalet 24 # Printing can now be limited either by user's account balance or by 25 # page quota (the default). Quota report doesn't include account balance 26 # yet, though. 27 # 23 28 # Revision 1.25 2003/04/15 21:58:33 jalet 24 29 # edpykota now accepts a --delete option. … … 234 239 return 235 240 241 def getUserLimitBy(self, userid) : 242 """Returns the way in which user printing is limited.""" 243 result = self.doQuery("SELECT limitby FROM users WHERE id=%s" % self.doQuote(userid)) 244 try : 245 return self.doParseResult(result)[0]["limitby"] 246 except TypeError : # Not found 247 return 248 249 def getGroupLimitBy(self, groupid) : 250 """Returns the way in which group printing is limited.""" 251 result = self.doQuery("SELECT limitby FROM groups WHERE id=%s" % self.doQuote(groupid)) 252 try : 253 return self.doParseResult(result)[0]["limitby"] 254 except TypeError : # Not found 255 return 256 236 257 def setUserBalance(self, userid, balance) : 237 258 """Sets the account balance for a given user to a fixed value."""