summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mailman/docs/NEWS.rst4
-rw-r--r--src/mailman/interfaces/subscriptions.py6
-rw-r--r--src/mailman/model/docs/subscriptions.rst2
-rw-r--r--src/mailman/rest/docs/membership.rst2
-rw-r--r--src/mailman/rest/members.py5
5 files changed, 11 insertions, 8 deletions
diff --git a/src/mailman/docs/NEWS.rst b/src/mailman/docs/NEWS.rst
index 9cdc8145d..4d08e770e 100644
--- a/src/mailman/docs/NEWS.rst
+++ b/src/mailman/docs/NEWS.rst
@@ -79,6 +79,8 @@ Interfaces
same algorithm. (Closes #118)
* ``IMessageStore.delete_message()`` no longer raises a ``LookupError`` when
you attempt to delete a nonexistent message from the message store.
+ * ``ISubscriptionService.find_members()`` accepts asterisks as wildcards in
+ the ``subscriber`` argument string. Given by Aurélien Bompard.
Internal API
------------
@@ -133,6 +135,8 @@ REST
given action.
* Global and list-centric bans can now be managed through the REST API.
Given by Aurélien Bompard.
+ * ``<api>/members/find`` accepts GET query parameters in addition to POST
+ arguments. Given by Aurélien Bompard.
Other
-----
diff --git a/src/mailman/interfaces/subscriptions.py b/src/mailman/interfaces/subscriptions.py
index 4efa41ce5..41ebcfa64 100644
--- a/src/mailman/interfaces/subscriptions.py
+++ b/src/mailman/interfaces/subscriptions.py
@@ -109,11 +109,9 @@ class ISubscriptionService(Interface):
digest member), the member can appear multiple times in this
list.
- The subscriber argument may contain an asterisk, which will be
- interpreted as a joker in the search pattern.
-
:param subscriber: The email address or user id of the user getting
- subscribed.
+ subscribed. This argument may contain asterisks, which will be
+ interpreted as wildcards in the search pattern.
:type subscriber: string or int
:param list_id: The list id of the mailing list to search for the
subscriber's memberships on.
diff --git a/src/mailman/model/docs/subscriptions.rst b/src/mailman/model/docs/subscriptions.rst
index eca6ef3a6..6237a24b3 100644
--- a/src/mailman/model/docs/subscriptions.rst
+++ b/src/mailman/model/docs/subscriptions.rst
@@ -105,7 +105,7 @@ There may be no matching memberships.
>>> list(service.find_members('dave@example.com'))
[]
-The address may contain an asterisk, which will be interpreted as a joker in
+The address may contain asterisks, which will be interpreted as a wildcard in
the search pattern.
>>> for member in service.find_members('*person*'):
diff --git a/src/mailman/rest/docs/membership.rst b/src/mailman/rest/docs/membership.rst
index bd4a85eeb..3d2d9a010 100644
--- a/src/mailman/rest/docs/membership.rst
+++ b/src/mailman/rest/docs/membership.rst
@@ -626,7 +626,7 @@ Finally, we can search for a specific member given all three criteria.
start: 0
total_size: 1
-Search can also be performed using HTTP GET requests.
+Search can also be performed using HTTP GET queries.
>>> dump_json('http://localhost:9001/3.0/members/find'
... '?subscriber=cperson@example.com'
diff --git a/src/mailman/rest/members.py b/src/mailman/rest/members.py
index b7807271f..ad027b119 100644
--- a/src/mailman/rest/members.py
+++ b/src/mailman/rest/members.py
@@ -369,7 +369,7 @@ class FindMembers(_MemberBase):
list_id=str,
subscriber=str,
role=enum_validator(MemberRole),
- # Expect pagination
+ # Allow pagination.
page=int,
count=int,
_optional=('list_id', 'subscriber', 'role', 'page', 'count'))
@@ -378,7 +378,8 @@ class FindMembers(_MemberBase):
except ValueError as error:
bad_request(response, str(error))
else:
- # Remove pagination query elements, it will be handled later.
+ # Remove any optional pagination query elements; they will be
+ # handled later.
data.pop('page', None)
data.pop('count', None)
members = service.find_members(**data)