summaryrefslogtreecommitdiff
path: root/src/mailman/model/member.py
Commit message (Collapse)AuthorAgeFilesLines
* Bump copyright years.Barry Warsaw2017-01-041-1/+1
|
* Use `atpublic` for @public instead of internal copy.Barry Warsaw2016-11-291-1/+1
|
* MySQL is now an officially supported database.Barry Warsaw2016-07-291-3/+3
| | | | Given by Abhilash Raj.
* New template system. Closes #249Barry Warsaw2016-07-161-6/+15
| | | | | The new template system is introduced for API 3.1. See ``src/mailman/rest/docs/templates.rst`` for details.
* Allow fall backs for moderation actions.Barry Warsaw2016-04-011-1/+1
| | | | | | | | | The `moderation_action` for members and nonmember can now be ``None`` which signals falling back to the appropriate list default action, e.g. `default_member_action` and `default_nonmember_action`. Given by Aurélien Bompard. Closes #189
* Members and nonmembers moderation action fallbackAurélien Bompard2016-03-311-7/+3
| | | | | | | | Members and nonmember's moderation action should be None by default, and in that case the moderation rule should fallback to the mailing list's default action. Fixes: #189
* Clean up the model and languages directories.Barry Warsaw2016-03-251-7/+4
|
* First massive round of cleanups.Barry Warsaw2016-03-231-6/+5
| | | | | | | | * Get rid of explicit __all__ settings and use the @public decorator. * Get rid of ^L's * Use expected_count argument for get_queue_messages() * Various code modernizations. * Other minor changes to make flake8 happy.
* Boost coverage.Barry Warsaw2016-01-091-5/+3
|
* Boost coverage.Barry Warsaw2016-01-081-1/+1
|
* Happy New Year.Barry Warsaw2016-01-021-1/+1
|
* Give the predictable ID factories similar APIs.Aurélien Bompard2015-12-261-3/+3
|
* Add a couple indexes on MemberAurélien Bompard2015-12-151-2/+2
|
* Add useful indexes on the member tableAurélien Bompard2015-11-211-3/+3
|
* Added IMember.subscriber to definitively return how a member is subscribed toBarry Warsaw2015-04-141-0/+4
| | | | | | | | | | | | | the mailing list (via preferred address/user or explicit address). IMember.get_member() is defined to return the explicit address when members are subscribed in both ways. IMember.get_memberships() returns a sequence of length 0, 1, or 2 containing all the member records associated with the email address. Fixed the AbstractMemberRoster methods query to properly return subscriptions via the user's preferred address and via an explicit address.
* Bump copyright years.Barry Warsaw2015-01-041-1/+1
|
* Remove huge amounts of now unnecessary file boilerplate.Barry Warsaw2014-12-221-8/+5
|
* Clean up pass.Barry Warsaw2014-09-221-3/+3
|
* fix all tests in mailman.model.testsAbhilash Raj2014-09-131-2/+6
|
* * change declarative_base class to use ModelMeta classAbhilash Raj2014-09-061-3/+3
| | | | * update some queries to match SA style
* replace all storm types and relationships with sqlalchemyAbhilash Raj2014-09-051-13/+11
|
* * Module coding style consistency.Barry Warsaw2014-03-021-3/+11
| | | | | | | * handle_SubscriptionEvent(): We're always guaranteed to get a language from a member, since lookup falls back ultimately to the system preferences. So this method can be simplified. * Bump up code coverage for several modules.
* Bump copyright years.Barry Warsaw2014-01-011-1/+1
|
* Bump copyright years.Barry Warsaw2013-01-011-1/+1
|
* * Two new events are triggered on membership changes: `SubscriptionEvent`Barry Warsaw2012-12-231-1/+5
| | | | | when a new member joins a mailing list, and an `UnsubscriptionEvent` when a member leaves a mailing list. (LP: #1047286)
* * Schema migrations (LP: #1024509)Barry Warsaw2012-09-041-1/+1
| | | | - member.mailing_list -> list_id
* * The link between members and the mailing lists they are subscribed to, isBarry Warsaw2012-09-041-8/+14
| | | | | | | | | | | | | | | now via the RFC 2369 `list_id` instead of the fqdn listname (i.e. posting address). This is because while the posting address can change if the mailing list is moved to a new server, the list id is fixed. (LP: #1024509) + IListManager.get_by_list_id() added. + IListManager.list_ids added. + IMailingList.list_id added. + Several internal APIs that accepted fqdn list names now require list ids, e.g. ISubscriptionService.join() and .find_members(). + IMember.list_id attribute added; .mailing_list is now an alias that retrieves and returns the IMailingList. - list_id added (LP: #1024509)
* General code cleanup.Barry Warsaw2012-04-251-2/+3
| | | | | | | | - Add explicit dependency on zope.event in setup.py. - Use Python 3 compatible syntax for specifying that a class implements an interface, i.e. the @implementer class decorator. - print_function futures. - Whitespace normalization.
* - Module modernatizations (print function).Barry Warsaw2012-04-221-5/+6
| | | | - Convert direct use of config.db global to use the @dbconnection decorator.
* copybumpBarry Warsaw2012-01-011-1/+1
|
* Improved the way flufl.enum.Enums are stored in the database. Now, theyBarry Warsaw2011-09-231-2/+2
| | | | | | | | should always be stored as INTEGER columns, with the enum class explicitly described in the code. This should be more efficient, and besides EIBTI. Also, filled in a few additional IMailingList attributes which were not documented in the interface.
* * User and Member ids are now proper UUIDs. The UUIDs are pended as unicodes,Barry Warsaw2011-08-301-1/+2
| | | | | | | | | | | | | | | | | | and exposed to the REST API as their integer equivalents. They are stored in the database using Storm's UUID type. - ISubscriptionService.get_member() now takes a UUID - IUserManager.get_user_by_id() now takes a UUID * Moderators and owners can be added via REST (LP: #834130). Given by Stephen A. Goss. - add_member() grows a `role` parameter. - ISubscriptionService.join() grows a `role` parameter. * InvalidEmailAddressError no longer repr()'s its value. * `address` -> `email` for consistency - delete_member() - ISubscriptionService.leave() * Fixed typo in app/subscriptions.py __all__ * AlreadySubscribedError: attributes are now public. * More .txt -> .rst renames.
* Ensure that a member's address cannot be changed to an address they do notBarry Warsaw2011-04-251-0/+3
| | | | control.
* Complete the ability to change a subscription address, both internally and viaBarry Warsaw2011-04-251-2/+16
| | | | | | | | | | | | | | the REST API. (LP: #643949) * New resource path in REST API: /addresses/<email>/memberships gets all the memberships for a given email address. * In the REST API, PUTting or PATCHing a list configuration now returns a 204 (No Content) success code instead of a 200 success code with an empty body. * When a user is subscribed with their preferred address, changing the preferred address also changes all subscriptions. * When a user is subscribed with a specific address, their subscription can be changed to any verified address they control. * Use a new naming scheme for doctests with multiple mailing lists.
* Give IMembers a unique member id. We have to do this in order to give them aBarry Warsaw2011-04-221-0/+21
| | | | | | | | | | | | | | | | | | | | | | | path at the root of the resource tree (i.e. /members/X) and because when members can be subscribed by their IUser record (for preferred address), their canonical location cannot contain the address they are subscribed with. When their preferred address changes (without otherwise touching their membership), this address will change and that's not good for a canonical location. Other changes: * Added IMember.member_id attribute * Added ISubscriptionService.get_member() so member records can be retrieve by member id. * We can now get individual members by id via the REST API. * Extend the UniqueIDFactory so that it can take a 'context' (defaulting to None). The context is only used in the testing infrastructure so that separate files can be used for user ids and member ids. Otherwise, we'd have gaps in those sequences. * When *not* in testing mode, ensure that UIDs cannot be reused by keeping a table of all UIDs ever handed out. We *should* never get collisions, but this ensures it. * Clean up mailman.sql
* Users can now subscribe to a mailing list, and their preferred address willBarry Warsaw2011-04-171-4/+25
| | | | get delivery.
* Add an attribute for getting the IUser record from an IMember record. This isBarry Warsaw2011-04-081-0/+5
| | | | pure convenience by way of an IUserManager lookup.
* Happy New Year.Barry Warsaw2011-01-011-1/+1
|
* Because it was just to damn confusing, rename IAddress.address toBarry Warsaw2011-01-011-1/+1
| | | | | | IAddress.email and IAddress.original_address to IAddress.original_email. From now on we'll use "address" to talk about the IAddress object and "email" to talk about the textual email address.
* Fairly significant change to the way member and nonmember moderation occurs.Barry Warsaw2010-12-291-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | Now, nonmembers are represented by a separate roster of IMembers, the latter which has grown a `moderation_action` enum. When that action is `defer`, then the normal processing rules apply. Anything else and the `moderation` chain is jumped to for a shortcut to moderation (which may include immediate acceptance). TODO: handle unregistered nonmembers. Details: * The member-moderation rule is renamed to just moderation, and handles both members and nonmembers (though the latter must currently be registered). * The moderation rule is moved up in the builtin chain. It is now checked after `approved`, `emergency`, and `loop`, but before the normal moderation checks. This means that nonmember postings will be (by default) held much earlier. * IMember.is_moderated is removed. * IMember.moderation_action is added. * IMailingList.default_member_moderation is removed. * IMailingList.default_member_action and IMailingList.default_nonmember_action are added. * MemberRole.nonmember is added.
* This is part 1 of the merge of Jimmy Bergman's branchBarry Warsaw2010-12-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lp:~jimmy-sigint/mailman/restapi_additional_attributes Ostensibly, this adds support for a few additional attributes through the REST API: * default_member_moderation * generic_nonmember_action * member_moderation_action * reply_goes_to_list * send_welcome_msg * welcome_msg However, I had never previously fleshed out the conversion of default_member_moderation and member_moderation_action into the MM3 way of things. That is now done. Non-member moderation still needs to be done. Specific changes: * mailman.chains.base.Chain no longer self registers * The built-in chain gets a new link for checking 'member-moderation'. If this rule matches, it jumps to the 'member-moderation' chain, which checks member_moderation_action and returns a link that jumps to the appropriate terminal chain. * Chain initialization is done by the same auto-detection as rules, handlers, etc. The one tricky thing is that abstract base classes such as Chain and TerminalChainBase can't be instantiated. For now, there's an ugly special case to skip these. * default_member_moderation is now exposed in the IMailingList interface. * Member.is_moderated gets set in the constructor from the mailing list's default_member_moderation. * The 'moderation' rule is renamed 'member-moderation'. TODO: * Work out non-member moderation * Add member_moderation_action to IMailingList * Double check tests for reply_goes_to_list, send_welcome_msg, and welcome_msg
* Fix the obvious errors identified by pyflakes. Skip false positives (mostlyBarry Warsaw2010-10-081-1/+1
| | | | | due to _() interpolation) and a few other problems that did not have immediately obvious fixes.
* Happy New Year.Barry Warsaw2010-01-011-1/+1
|
* Move a module.Barry Warsaw2009-11-041-1/+1
|
* database/model reorganization. Model classes go in mailman.model. StockBarry Warsaw2009-10-101-0/+105
database support goes in mailman.database. Move stuff out of mailman/database/__init__.py.