Show
Ignore:
Timestamp:
09/17/05 16:29:43 (19 years ago)
Author:
jerome
Message:

Upgraded database schema.
Added -i | --ingroups command line option to repykota.
Added -C | --comment command line option to edpykota.
Added 'noquota', 'noprint', and 'nochange' as switches for edpykota's
-l | --limitby command line option.
Severity : entirely new features, in need of testers :-)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/tool.py

    r2409 r2452  
    485485        # first we check any group the user is a member of 
    486486        for group in self.storage.getUserGroups(user) : 
    487             grouppquota = self.storage.getGroupPQuota(group, printer) 
    488             # for the printer and all its parents 
    489             for gpquota in [ grouppquota ] + grouppquota.ParentPrintersGroupPQuota : 
    490                 if gpquota.Exists : 
    491                     action = self.checkGroupPQuota(gpquota) 
    492                     if action == "DENY" : 
    493                         return action 
    494                     elif action == "WARN" :     
    495                         warned = 1 
     487            # No need to check anything if the group is in noquota mode 
     488            if group.LimitBy != "noquota" : 
     489                grouppquota = self.storage.getGroupPQuota(group, printer) 
     490                # for the printer and all its parents 
     491                for gpquota in [ grouppquota ] + grouppquota.ParentPrintersGroupPQuota : 
     492                    if gpquota.Exists : 
     493                        action = self.checkGroupPQuota(gpquota) 
     494                        if action == "DENY" : 
     495                            return action 
     496                        elif action == "WARN" :     
     497                            warned = 1 
    496498                         
    497499        # Then we check the user's account balance