Changeset 2452 for pykota/trunk/bin/cupspykota
- Timestamp:
- 09/17/05 16:29:43 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/bin/cupspykota
r2449 r2452 823 823 824 824 if self.Action != "DENY" : 825 if self.User.LimitBy == "noprint" : 826 self.printInfo(_("User %s is not allowed to print at this time.") % self.UserName, "warn") 827 self.Action = "DENY" 828 829 if self.Action != "DENY" : 825 830 # If printing is still allowed at this time, we 826 831 # need to extract the billing code information from the database. … … 841 846 # No need to do this if the job is denied, this way we 842 847 # save some database queries. 843 self.logdebug("Checking user %s print quota entry on printer %s" \ 848 if self.User.LimitBy in ('noquota', 'nochange') : 849 self.logdebug("User %s is allowed to print with no limit, no need to check quota." % self.UserName) 850 else : 851 self.logdebug("Checking user %s print quota entry on printer %s" \ 844 852 % (self.UserName, self.PrinterName)) 845 self.Action = self.warnUserPQuota(self.UserPQuota)853 self.Action = self.warnUserPQuota(self.UserPQuota) 846 854 847 855 # exports some new environment variables … … 912 920 self.printInfo(_("Job size : %i") % self.JobSize) 913 921 914 # update the quota for the current user on this printer 915 self.printInfo(_("Updating user %s's quota on printer %s") % (self.UserName, self.PrinterName)) 916 self.JobPrice = self.UserPQuota.increasePagesUsage(self.JobSize) 922 if self.User.LimitBy == "nochange" : 923 # no need to update the quota for the current user on this printer 924 self.printInfo(_("User %s's quota on printer %s won't be modified") % (self.UserName, self.PrinterName)) 925 self.JobPrice = self.UserPQuota.computeJobPrice(self.JobSize) 926 else : 927 # update the quota for the current user on this printer 928 self.printInfo(_("Updating user %s's quota on printer %s") % (self.UserName, self.PrinterName)) 929 self.JobPrice = self.UserPQuota.increasePagesUsage(self.JobSize) 917 930 918 931 # adds the current job to history