diff options
| author | J08nY | 2017-07-26 22:31:40 +0200 |
|---|---|---|
| committer | J08nY | 2017-07-26 22:31:40 +0200 |
| commit | 800dd99fe45cf1ff2611fd115936d3113516d342 (patch) | |
| tree | 99f0c1bf256bc13d0580816ce7dcc5a89e2a6224 /src/mailman_pgp/workflows | |
| parent | 13055e265c738be43c0a4cb4c2898939cd0c1cd5 (diff) | |
| download | mailman-pgp-800dd99fe45cf1ff2611fd115936d3113516d342.tar.gz mailman-pgp-800dd99fe45cf1ff2611fd115936d3113516d342.tar.zst mailman-pgp-800dd99fe45cf1ff2611fd115936d3113516d342.zip | |
Diffstat (limited to 'src/mailman_pgp/workflows')
| -rw-r--r-- | src/mailman_pgp/workflows/key_change.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mailman_pgp/workflows/key_change.py b/src/mailman_pgp/workflows/key_change.py index 01693f5..61acf95 100644 --- a/src/mailman_pgp/workflows/key_change.py +++ b/src/mailman_pgp/workflows/key_change.py @@ -16,6 +16,7 @@ # this program. If not, see <http://www.gnu.org/licenses/>. """""" +from lazr.config import as_timedelta from mailman.email.message import UserNotification from mailman.interfaces.pending import IPendable, IPendings from mailman.interfaces.subscriptions import TokenOwner @@ -26,6 +27,7 @@ from public import public from zope.component import getUtility from zope.interface import implementer +from mailman_pgp.config import config from mailman_pgp.database import transaction from mailman_pgp.model.address import PGPAddress from mailman_pgp.model.list import PGPMailingList @@ -93,7 +95,8 @@ class KeyChangeWorkflow(Workflow): pubkey=str(self.pubkey), fingerprint=self.pubkey.fingerprint ) - self.token = pendings.add(pendable) + lifetime = as_timedelta(config.get('misc', 'change_request_lifetime')) + self.token = pendings.add(pendable, lifetime=lifetime) self.token_owner = TokenOwner.subscriber self.push('receive_confirmation') |
