diff options
| author | J08nY | 2017-07-31 22:40:01 +0200 |
|---|---|---|
| committer | J08nY | 2017-07-31 22:40:01 +0200 |
| commit | 39291794b39b52804b2b45d74d0d5aad0f0eefcf (patch) | |
| tree | 2a606169dcd655f5dc5b69b1770fa1fd72a5298e /src/mailman_pgp/model/list.py | |
| parent | b16fe8644ddc82584a8ff9a2f98e40c1571437f2 (diff) | |
| download | mailman-pgp-39291794b39b52804b2b45d74d0d5aad0f0eefcf.tar.gz mailman-pgp-39291794b39b52804b2b45d74d0d5aad0f0eefcf.tar.zst mailman-pgp-39291794b39b52804b2b45d74d0d5aad0f0eefcf.zip | |
Diffstat (limited to 'src/mailman_pgp/model/list.py')
| -rw-r--r-- | src/mailman_pgp/model/list.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mailman_pgp/model/list.py b/src/mailman_pgp/model/list.py index 838bcab..946af34 100644 --- a/src/mailman_pgp/model/list.py +++ b/src/mailman_pgp/model/list.py @@ -16,7 +16,7 @@ # this program. If not, see <http://www.gnu.org/licenses/>. """Model for PGP enabled mailing lists.""" - +from lazr.config import as_boolean from mailman.database.types import Enum, SAUnicode from mailman.interfaces.action import Action from mailman.interfaces.listmanager import (IListManager, ListDeletingEvent) @@ -145,8 +145,12 @@ class PGPMailingList(Base): @classhandler.handler(ListDeletingEvent) def on_delete(event): + shred = as_boolean(config.get('keypairs', 'shred')) pgp_list = PGPMailingList.for_list(event.mailing_list) if pgp_list: with transaction() as session: - # TODO shred the list key + if shred: + pgp_list.fs_key.shred() + else: + pgp_list.fs_key.delete() session.delete(pgp_list) |
