Abhilash Raj has proposed merging lp:~raj-abhilash1/mailman.client/master into
lp:mailman.client.
Requested reviews:
Mailman Coders (mailman-coders)
For more details, see:
https://code.launchpad.net/~raj-abhilash1/mailman.client/master/+merge/187105
* added options to create list's keys, retrive list's keys
* user can add his keys, or post his public key data which then gets imported.
--
https://code.launchpad.net/~raj-abhilash1/mailman.client/master/+merge/187105
Your team Mailman Coders is requested to review the proposed merge of
lp:~raj-abhilash1/mailman.client/master into lp:mailman.client.
=== modified file 'src/mailmanclient/_client.py'
--- src/mailmanclient/_client.py 2013-03-22 18:28:16 +0000
+++ src/mailmanclient/_client.py 2013-09-23 20:34:45 +0000
@@ -367,6 +367,11 @@
return self._info.get('display_name')
@property
+ def public_key(self):
+ self._get_info()
+ return self._info.get('public_key')
+
+ @property
def members(self):
url = 'lists/{0}/roster/member'.format(self.fqdn_listname)
response, content = self._connection.call(url)
@@ -427,6 +432,14 @@
entries.append(request)
return entries
+ def signature_max_age(self):
+ """Maximimum age of a signature allowed to be posted
+ """
+ response, content = self._connection.call(
+ 'lists/{0}/requests_max_age'.format(self.fqdn_listname), None, 'GET')
+
+ return response
+
def add_owner(self, address):
self.add_role('owner', address)
@@ -536,7 +549,11 @@
response, content = self._connection.call(
'lists/{0}'.format(self.fqdn_listname), None, 'DELETE')
-
+ def create_keys(self):
+ """Generate the pgp-keys associated with the mailing list"""
+ response, content = self._connection.call(
+ 'lists/{0}/create_keys'.format(self.fqdn_listname), None, 'GET')
+
class _Member:
def __init__(self, connection, url):
self._connection = connection
@@ -603,6 +620,7 @@
self._subscription_list_ids = None
self._preferences = None
self._cleartext_password = None
+ self._key = None
def __repr__(self):
return '<User "{0}" ({1})>'.format(
@@ -681,6 +699,19 @@
path = 'users/{0}/preferences'.format(self.user_id)
self._preferences = _Preferences(self._connection, path)
return self._preferences
+
+ @property
+ def key(self):
+ response, content = self._connection.call(
+ 'users/{0}/key'.format(self.user_id),
+ method='GET')
+ return content
+
+ def import_key(self, **kwargs):
+ print kwargs
+ response, content = self._connection.call(
+ 'users/{0}/key'.format(self.user_id),
+ kwargs, method='POST')
def save(self):
data = {'display_name': self.display_name}
@@ -822,8 +853,8 @@
'join_address', 'last_post_at', 'leave_address',
'list_id', 'list_name', 'next_digest_number',
'no_reply_address', 'owner_address', 'post_id',
- 'posting_address', 'request_address', 'scheme',
- 'volume', 'web_host',)
+ 'posting_address', 'public_key', 'request_address',
+ 'scheme', 'volume', 'web_host',)
class _Settings:
_______________________________________________
Mailman-coders mailing list
[email protected]
https://mail.python.org/mailman/listinfo/mailman-coders