X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/chopwood/blobdiff_plain/710c89c8144b6ea127c8c0ec29c8894cc4611969..fb306d6efd803bb855c8a84b750c400a668e332b:/operation.py diff --git a/operation.py b/operation.py index 50d7952..fccd172 100644 --- a/operation.py +++ b/operation.py @@ -179,7 +179,7 @@ class BaseRequest (object): 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. """ @@ -343,14 +343,15 @@ def operate(op, accts, *args, **kw): """ 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: