Mailman Core merge requestshttps://staging.gitlab.com/mailman/mailman/-/merge_requests2016-11-26T05:25:46Zhttps://staging.gitlab.com/mailman/mailman/-/merge_requests/108Updates deprecated syncdb to migrate. Issue #1972016-11-26T05:25:46Zusername-removed-142183Updates deprecated syncdb to migrate. Issue #197Updated docs in WebUiIn5. Solves issue #197 Updated docs in WebUiIn5. Solves issue #197 https://staging.gitlab.com/mailman/mailman/-/merge_requests/189Transmit the moderation reason to hold_message()2016-11-25T16:38:26Zusername-removed-35210Transmit the moderation reason to hold_message()The `reason` attribute of `hold_message()` was always `None`. Serialize
the moderation reasons list and pass it to the function.
This allows the `reason` attribute in REST to actually contain the
moderation reason. It was always blank b...The `reason` attribute of `hold_message()` was always `None`. Serialize
the moderation reasons list and pass it to the function.
This allows the `reason` attribute in REST to actually contain the
moderation reason. It was always blank before.3.1https://staging.gitlab.com/mailman/mailman/-/merge_requests/181Issue 68: send messages to list moderators when tomoderators=True2016-11-14T03:30:57Zusername-removed-637286Issue 68: send messages to list moderators when tomoderators=True3.1username-removed-56772username-removed-56772https://staging.gitlab.com/mailman/mailman/-/merge_requests/194Remove digest mbox after sending it2016-11-01T22:31:55Zusername-removed-35210Remove digest mbox after sending itFixes #259Fixes #2593.1https://staging.gitlab.com/mailman/mailman/-/merge_requests/212Fixes REST server bad HTTP request with code 200 issue2016-10-30T22:21:34Zusername-removed-671608Fixes REST server bad HTTP request with code 200 issueFixed by overriding `BaseHTTPRequestHandler`'s [`send_error`](https://github.com/python/cpython/blob/master/Lib/http/server.py#L422) method in `AdminWebServiceWSGIRequestHandler` class and prepending headers to `error_message_format` var...Fixed by overriding `BaseHTTPRequestHandler`'s [`send_error`](https://github.com/python/cpython/blob/master/Lib/http/server.py#L422) method in `AdminWebServiceWSGIRequestHandler` class and prepending headers to `error_message_format` variable.
Fixes: https://gitlab.com/mailman/mailman/issues/288https://staging.gitlab.com/mailman/mailman/-/merge_requests/188REST: add a PATCH method handler for domains2016-10-27T12:51:16Zusername-removed-35210REST: add a PATCH method handler for domainshttps://staging.gitlab.com/mailman/mailman/-/merge_requests/210Sort the ban list by email2016-10-27T00:19:27Zusername-removed-35210Sort the ban list by emailSee https://gitlab.com/mailman/mailman/merge_requests/195#note_17474568See https://gitlab.com/mailman/mailman/merge_requests/195#note_174745683.1https://staging.gitlab.com/mailman/mailman/-/merge_requests/161REST: add a query string to only get advertised lists2016-10-26T13:08:27Zusername-removed-35210REST: add a query string to only get advertised listsWithout this change, the only way to get advertised lists only is to get all lists, get their settings with another REST call (one per list), and manually filter. This makes the front page of Postorius very slow. This change adds a query...Without this change, the only way to get advertised lists only is to get all lists, get their settings with another REST call (one per list), and manually filter. This makes the front page of Postorius very slow. This change adds a query string parameter to filter only advertised lists.3.1https://staging.gitlab.com/mailman/mailman/-/merge_requests/198Fixes for #280.2016-10-22T22:42:02Zusername-removed-107958Fixes for #280.This extends header filters to use sub-part headers.This extends header filters to use sub-part headers.https://staging.gitlab.com/mailman/mailman/-/merge_requests/180flake8-respect-noqa is no longer required with flake8>3.02016-09-16T18:45:15Zusername-removed-262flake8-respect-noqa is no longer required with flake8>3.0This also fixes a small QA error that was ignored by the
flake8-respect-noqa for some reason.This also fixes a small QA error that was ignored by the
flake8-respect-noqa for some reason.https://staging.gitlab.com/mailman/mailman/-/merge_requests/184Forbid newlines in the REST representation of a Mailing-List2016-08-24T04:36:47Zusername-removed-35210Forbid newlines in the REST representation of a Mailing-ListFixes: #273Fixes: #2733.1username-removed-56772username-removed-56772https://staging.gitlab.com/mailman/mailman/-/merge_requests/167Updated docs2016-08-16T05:29:28Zusername-removed-563829Updated docsCloses: https://gitlab.com/mailman/postorius/issues/138
Standalone git repo removed
mailmanclient name updated from mailman.client
Virtualenv setup instructions added.
Closes: https://gitlab.com/mailman/postorius/issues/138
Standalone git repo removed
mailmanclient name updated from mailman.client
Virtualenv setup instructions added.
https://staging.gitlab.com/mailman/mailman/-/merge_requests/176MySQL support2016-07-29T23:30:26Zusername-removed-56772MySQL supportMost of this branch is @maxking 's work from mailman/mailman!162 which it supersedes.
This branch resolves conflicts created when the trunk has evolved, most specifically by landing the templates branch. This also cleans up a few thi...Most of this branch is @maxking 's work from mailman/mailman!162 which it supersedes.
This branch resolves conflicts created when the trunk has evolved, most specifically by landing the templates branch. This also cleans up a few things here and there, and ports the templates/cache tables to MySQL.3.1username-removed-56772username-removed-56772https://staging.gitlab.com/mailman/mailman/-/merge_requests/162MySQL support for Mailman2016-07-16T20:50:30Zusername-removed-262MySQL support for MailmanThis merge request adds MySQL database support to Mailman.
I have added a two new Column types for Unicode to handle the constraint in MySQL to specify the length of VARCHAR columns.
```python
@public
class SAUnicode(TypeDecora...This merge request adds MySQL database support to Mailman.
I have added a two new Column types for Unicode to handle the constraint in MySQL to specify the length of VARCHAR columns.
```python
@public
class SAUnicode(TypeDecorator):
"""Unicode datatype to support fixed length VARCHAR in mysql
This type compiles to VARCHAR(255) in case of mysql and in case of other
dailects defaults to the Unicode type. This was just created so that I
don't alter the output of the default Unicode data type and it can still be
used if needed in the codebase.
"""
impl = Unicode
```
The above type compiles to `VARCHAR(255)` when using Mysql and the default value in other database dailects due to the following two compile directives:
```python
@compiles(SAUnicode)
def default_sa_unicode(element, compiler, **kw):
return compiler.visit_Unicode(element, **kw)
@compiles(SAUnicode, 'mysql')
def compile_sa_unicode(element, compiler, **kw):
return "VARCHAR(255)"
```
By default, I changed all the Unicode fields to this column. If any of the fields require length longer than this, I have specified another column type similar to the above which can be used if needed.
```python
@public
class SAUnicodeLarge(TypeDecorator):
"""Similar to SAUnicode type, but compiles to VARCHAR(510), double size of
SAUnicode defined above.
"""
impl = Unicode
```
Which compiles to `VARCHAR(510)` (double length of the SAUnicode column).
Also, there is still a test that I am skipping for MySQL which deals for case-sensitivity of the arguments. The [case-sensityvity support for MySQL is inconsistent][2] and I am not sure how to guarantee that the test passes everytime. See `test_create_list_case_folding` in `mailman/model/tests/test_listmanager.py` below.
Another thing to note is the default `collate` on the MySQL databases required for the tests. I usually always set the collate to `utf8_general_ci` as `latin1`(default on most servers) causes some tests to fail with mixed collation error. I don't know very much about collations though. You can change the default collate on a database with:
```bash
mysql> ALTER DATABASE mailman DEFAULT COLLATE utf8_unicode_ci;
```
I have mentioned this in the docs and also the test infrastructure is adjusted to support this default collate on the databases created for the CI. I am using a _slightly_ modified version of the mysql image, you can see it [on Dockerhub][1]. Just a slight modification in the configuration.
This request outdates !51 .
[1]: https://hub.docker.com/r/maxking/mysql/~/dockerfile/
[2]: http://docs.sqlalchemy.org/en/latest/dialects/mysql.html#case-sensitivity-and-table-reflection
3.1username-removed-56772username-removed-56772https://staging.gitlab.com/mailman/mailman/-/merge_requests/170Templates branch2016-07-16T19:45:31Zusername-removed-56772Templates branchThis removes the IMailingList.*_uri attributes and implements a template manager and template loader interface. It became surprisingly huge due to the widespread tendrils of the existing uri mechanisms. I wonder if this is too big for ...This removes the IMailingList.*_uri attributes and implements a template manager and template loader interface. It became surprisingly huge due to the widespread tendrils of the existing uri mechanisms. I wonder if this is too big for 3.1, but OTOH this is an important new feature and I'd previously committed to it as a blocker.3.1username-removed-56772username-removed-56772https://staging.gitlab.com/mailman/mailman/-/merge_requests/175support setting list moderator_password via REST api (#207)2016-07-14T14:03:44Zusername-removed-81251support setting list moderator_password via REST api (#207)added moderator_password to the ATTRIBUTES dict as suggested by @thelinuxguy in [#207](https://gitlab.com/mailman/mailman/issues/207), added a `bytes_to_str` function to helpers.py to convert the bytes stored in the database to a string ...added moderator_password to the ATTRIBUTES dict as suggested by @thelinuxguy in [#207](https://gitlab.com/mailman/mailman/issues/207), added a `bytes_to_str` function to helpers.py to convert the bytes stored in the database to a string in ` ExtendedEncoder`.
When set, the password is encrypted with `config.password_context.encrypt`, and when returned, is returned encrypted to not leak the cleartext password. 3.1https://staging.gitlab.com/mailman/mailman/-/merge_requests/174support setting list moderator_password via REST api (#207)2016-07-13T21:54:41Zusername-removed-81251support setting list moderator_password via REST api (#207)added moderator_password to the ATTRIBUTES dict as suggested by @thelinuxguy in [#207](https://gitlab.com/mailman/mailman/issues/207), added a `bytes_to_str` function to helpers.py to convert the bytes stored in the database to a string ...added moderator_password to the ATTRIBUTES dict as suggested by @thelinuxguy in [#207](https://gitlab.com/mailman/mailman/issues/207), added a `bytes_to_str` function to helpers.py to convert the bytes stored in the database to a string in ` ExtendedEncoder`.
When set, the password is encrypted with `config.password_context.encrypt`, and when returned, is returned encrypted to not leak the cleartext password. https://staging.gitlab.com/mailman/mailman/-/merge_requests/169REST: allow setting a member's moderation_action to None2016-07-13T00:26:08Zusername-removed-35210REST: allow setting a member's moderation_action to NoneA `None` value for a member's `moderation_action` has meaning now, but couldn't be set in the REST API. This MR makes it possible.A `None` value for a member's `moderation_action` has meaning now, but couldn't be set in the REST API. This MR makes it possible.3.1username-removed-56772username-removed-56772https://staging.gitlab.com/mailman/mailman/-/merge_requests/171Better handling of the REST API plumbing.2016-06-28T10:36:45Zusername-removed-56772Better handling of the REST API plumbing.* Add a version_info field which is a better way to do ordered
comparisions of the API version.
* All subresources now get their .api attribute set automatically, if
they are passed back through the ObjectRouter. No more fiddling...* Add a version_info field which is a better way to do ordered
comparisions of the API version.
* All subresources now get their .api attribute set automatically, if
they are passed back through the ObjectRouter. No more fiddling with
context['api'] (unless of course, they don't make a roundtrip through
the main ObjectRouter loop.3.1username-removed-56772username-removed-56772https://staging.gitlab.com/mailman/mailman/-/merge_requests/93Expose the header matches in the REST API2016-06-27T02:48:10Zusername-removed-35210Expose the header matches in the REST APIThis branch exposes a mailing list's header matches in the REST API.
It is composed of 3 commits that are best understood in sequence:
* commit 3e69044a turns the former `HeaderMatchSet` into a `HeaderMatchList` because the order i...This branch exposes a mailing list's header matches in the REST API.
It is composed of 3 commits that are best understood in sequence:
* commit 3e69044a turns the former `HeaderMatchSet` into a `HeaderMatchList` because the order in which the header matches are processed by the rule is significant. For this reason, the HeaderMatch model classes have gained an `index` attribute that allows sorting and re-ordering. `HeaderMatchList` does not entirely behave like a list because we want a better API for `append` and `insert`.
* commit 432b07c5 changes the newly introduced `index` attribute into a property where the setter takes care of re-ordering the list of header matches.
* commit 703fc135 renames the `HeaderMatch.chain` attribute to `action` and coerces it to an `Action` enum. This is what this field is intended for, and allows validation of what the admin can set through the REST API.
* commit e1950ac8 adds the REST API endpoints and documentation.
Fixes: #192 3.1username-removed-56772username-removed-56772