It provides an empty `INFO' map; a simple `check' method which checks the
operation name (in the class attribute `OP') against the configured policy
- `CFG'ALLOWOP'; and the obvious `perform' method which assumes that the
+ `CFG.ALLOWOP'; and the obvious `perform' method which assumes that the
`ops' list has already been constructed.
"""
"""
rq = getattr(CFG.RQCLASS, op)(accts, *args, **kw)
desc = rq.describe()
- try:
- rq.check()
- except U.ExpectedError, e:
- L.syslog('REFUSE %s %s: %s' %
- (desc,
- ', '.join(['%s@%s' % (o.user, o.svc.name) for o in rq.ops]),
- e))
- raise
+ if not CFG.OPTS.ignpol:
+ try:
+ rq.check()
+ except U.ExpectedError, e:
+ L.syslog('REFUSE %s %s: %s' %
+ (desc,
+ ', '.join(['%s@%s' % (o.user, o.svc.name) for o in rq.ops]),
+ e))
+ raise
ops = rq.perform()
nwin = nlose = 0
for o in ops: