Abhilash Raj pushed to branch master at GNU Mailman / Mailman Core
Commits: 5442dc35 by Abhilash Raj at 2020-03-22T14:19:39-07:00 Include advertised settings in the list resource. This is needed by Postorius's index page. - - - - - 668f712f by Abhilash Raj at 2020-03-22T21:31:39+00:00 Merge branch 'expose-advertised' into 'master' Include advertised settings in the list resource. See merge request mailman/mailman!608 - - - - - 4 changed files: - src/mailman/docs/NEWS.rst - src/mailman/rest/docs/domains.rst - src/mailman/rest/docs/lists.rst - src/mailman/rest/lists.py Changes: ===================================== src/mailman/docs/NEWS.rst ===================================== @@ -62,6 +62,9 @@ REST * Add a new ``send_welcome_message`` flag when subscribing users to override MailingList's default setting. (Closes #362) * Expose content filtering settings for MailingList. (Closes #694) +* Add ``advertised`` attribute to ``MailingList`` object so Postorius doesn't + have to make multiple calls for Index Page. (See !608) + Features -------- ===================================== src/mailman/rest/docs/domains.rst ===================================== @@ -121,6 +121,7 @@ example.com domain does not contain any mailing lists. >>> dump_json('http://localhost:9001/3.0/domains/example.com/lists') entry 0: + advertised: True description: display_name: Test-domains fqdn_listname: test-doma...@example.com ===================================== src/mailman/rest/docs/lists.rst ===================================== @@ -19,6 +19,7 @@ Create a mailing list in a domain and it's accessible via the API. >>> dump_json('http://localhost:9001/3.0/lists') entry 0: + advertised: True description: display_name: Ant fqdn_listname: a...@example.com @@ -37,6 +38,7 @@ You can also query for lists from a particular domain. >>> dump_json('http://localhost:9001/3.0/domains/example.com/lists') entry 0: + advertised: True description: display_name: Ant fqdn_listname: a...@example.com @@ -100,6 +102,7 @@ example, we can search for all related lists of a particular address.:: >>> dump_json('http://localhost:9001/3.1/lists/find', { ... 'subscriber': 'g...@example.com'}) entry 0: + advertised: False description: display_name: Elk fqdn_listname: e...@example.com @@ -125,6 +128,7 @@ You can filter lists based on specific roles of a subscriber too.:: ... 'subscriber': 'ow...@example.com', ... 'role':'owner'}) entry 0: + advertised: False description: display_name: Elk fqdn_listname: e...@example.com @@ -152,6 +156,7 @@ page. >>> dump_json('http://localhost:9001/3.0/domains/example.com/lists' ... '?count=1&page=1') entry 0: + advertised: True description: display_name: Ant fqdn_listname: a...@example.com @@ -169,6 +174,7 @@ page. >>> dump_json('http://localhost:9001/3.0/domains/example.com/lists' ... '?count=1&page=2') entry 0: + advertised: False description: display_name: Elk fqdn_listname: e...@example.com @@ -221,6 +227,7 @@ The mailing list was created using the default style, which allows list posts. It is also available in the REST API via the location given in the response. >>> dump_json('http://localhost:9001/3.0/lists/bee.example.com') + advertised: True description: display_name: Bee fqdn_listname: b...@example.com @@ -238,6 +245,7 @@ address, if that has never been changed (since the list-id is immutable, but the posting address is not). >>> dump_json('http://localhost:9001/3.0/lists/b...@example.com') + advertised: True description: display_name: Bee fqdn_listname: b...@example.com ===================================== src/mailman/rest/lists.py ===================================== @@ -98,6 +98,7 @@ class _ListBase(CollectionMixin): def _resource_as_dict(self, mlist): """See `CollectionMixin`.""" return dict( + advertised=mlist.advertised, display_name=mlist.display_name, fqdn_listname=mlist.fqdn_listname, list_id=mlist.list_id, View it on GitLab: https://gitlab.com/mailman/mailman/-/compare/71774da48e77a37b482cbd85bdff21c2f0bff6f5...668f712f51cb7ff8208cece522738b0e86688880 -- View it on GitLab: https://gitlab.com/mailman/mailman/-/compare/71774da48e77a37b482cbd85bdff21c2f0bff6f5...668f712f51cb7ff8208cece522738b0e86688880 You're receiving this email because of your account on gitlab.com.
_______________________________________________ Mailman-checkins mailing list Mailman-checkins@python.org Unsubscribe: https://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org