aboutsummaryrefslogtreecommitdiff
path: root/src/mailman_pgp/workflows/key_change.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/mailman_pgp/workflows/key_change.py')
-rw-r--r--src/mailman_pgp/workflows/key_change.py5
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')