summaryrefslogtreecommitdiff
path: root/src/mailman/model
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove extraneous `test_suite()` functions. zope.testrunner willBarry Warsaw2011-10-306-50/+0
| | | | | | | | | automatically do the right thing in most cases. Keep test_suite() in test_documentation.py since these dynamically set up docs tests properly. Refactor test_passwords.py so that base class tests aren't bogusly run. Also, remove test_membership.py which was essentially disabled because it was testing the MM2 membership API.
* Fix a few bogus sort order assumptions uncovered by the PostgreSQL tests.Barry Warsaw2011-10-231-2/+3
|
* Finally, all doctests are named .rstBarry Warsaw2011-09-238-0/+0
|
* Improved the way flufl.enum.Enums are stored in the database. Now, theyBarry Warsaw2011-09-238-22/+30
| | | | | | | | 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.
* * Four new events are created, and notifications are sent during domainBarry Warsaw2011-09-022-1/+121
| | | | | | | | | | lifecycle changes: - DomainCreatingEvent - sent before the domain is created - DomainCreatedEvent - sent after the domain is created - DomainDeletingEvent - sent before the domain is deleted - DomainDeletedEvent - sent after the domain is deleted * Using the above events, when a domain is deleted, associated mailing lists are deleted. (LP: #837526)
* * New REST resource http://.../<domain>/lists can be GETed in order to findBarry Warsaw2011-08-302-0/+34
|\ | | | | | | | | all the mailing lists in a specific domain (LP: #829765). Given by Stephen A. Goss.
| * email_host => mail_hostStephen A. Goss2011-08-231-1/+1
| |
| * merged changes to main branchStephen A. Goss2011-08-233-30/+30
| |\
| * | some tweaks to fix for LP: 829765 based on feedbackStephen A. Goss2011-08-233-4/+32
| | |
| * | REST API: add listing of mailing lists per domainStephen A. Goss2011-08-191-0/+5
| | |
* | | * User and Member ids are now proper UUIDs. The UUIDs are pended as unicodes,Barry Warsaw2011-08-309-29/+47
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Rename IDomain.email_host to .mail_host for consistency. Similarly in theBarry Warsaw2011-08-223-30/+30
|/ | | | REST API. (LP: #831660)
* Complete bug 827036 work.Barry Warsaw2011-08-174-43/+78
| | | | | | | | | | | * Add ListCreatingEvent and ListDeletingEvent. These are sent before the operation actually occurs, whereas the previously added ListCreatedEvent and ListDeletedEvent are sent after the operation. Specifically, this is necessary because request database deletion requires the IMailingList object, which is only available before the list is deleted. * Add a handler to clear out the requests database for a mailing list, when the mailing list is about to be deleted.
* Basic infrastructure for fixing bug 827036.Barry Warsaw2011-08-171-0/+33
| | | | | | | | | * Use zope.events to signal when a mailing list has been created or deleted. * Register a handler for the ListDeletedEvent which cleans up member subscriptions. * Relax the criteria for find_members(), both internally and in the REST API, so that the subscriber is not required. E.g. you can now find all members of a mailing list.
* Send event notifications whenever a mailing list is created or deleted.Barry Warsaw2011-08-163-3/+79
|
* Remove all pylint vestiges.Barry Warsaw2011-08-032-3/+0
|
* * The IMailingList attribute ``host_name`` has been renamed to ``mail_host``Barry Warsaw2011-06-164-18/+18
| | | | | for consistency. This changes the REST API for mailing list resources. (LP: #787599)
* Major terminology shift:Barry Warsaw2011-06-011-2/+2
| | | | | | | | | | | | | | | | | * Queue runners are now called just 'Runners' since several of them don't manage queue directories. * Ban the term 'qrunner' too. * The master queue runner watcher should now just be called the 'master' or the 'master runner'. * bin/qrunner -> bin/runner * mailman.qrunner log file -> mailman.runner * master-qrunner.lck -> master.lck * master-qrunner.pid -> master.pid Also: * Remove some obsolete files * Begin the .txt -> .rst renaming
* * bounce_processing -> process_bouncesBarry Warsaw2011-05-271-1/+1
| | | | | * Finally get rid of BounceMixin * Test the simple case where the mailing list does no bounce processing.
* * bounce_unrecognized_goes_to_list_owner -> forward_unrecognized_bounces_to Barry Warsaw2011-05-253-12/+13
| | | | | | | | | | | | * Add an additional option for unrecognized bounce disposition: send it to the site administrators. * Move maybe_forward() from src/mailman/queue/bounce.py to src/mailman/app/bounces.py, refactor and add tests. * Add a LogFileMark class to help with tests that want to check the output to a log file. * OwnerNotification gets a better signature. Instead of tomoderators, the last argument is a roster to send the notification to. If roster is None, then the notification goes to the site administrators.
* * Flesh out IBounceProcessor so that you can get an iterator over all eventsBarry Warsaw2011-05-172-5/+80
| | | | | | | and over just the unprocessed events. * In the outgoing queue runner, work out the logic for when SomeRecipientsFailed with permanent failures in a probe message.
* * Fixed testsBarry Warsaw2011-05-141-1/+1
| | | | * Fix obvious typo in __init__(). How can we get Storm to help us with this?
* * BounceEvent.where -> BounceEvent.contextBarry Warsaw2011-05-132-12/+22
| | | | * Add BounceContext enum
* Add bounce registration and bounce events.Barry Warsaw2011-05-133-0/+186
|
* checkpointingBarry Warsaw2011-05-061-25/+19
|
* Ensure that a member's address cannot be changed to an address they do notBarry Warsaw2011-04-252-0/+28
| | | | control.
* Complete the ability to change a subscription address, both internally and viaBarry Warsaw2011-04-253-14/+154
| | | | | | | | | | | | | | 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.
* Users subscribed to a mailing list via their preferred address show upBarry Warsaw2011-04-222-1/+15
| | | | | correctly in the REST API's list of members. This even correctly tracks changes in their preferred address.
* Give IMembers a unique member id. We have to do this in order to give them aBarry Warsaw2011-04-224-1/+145
| | | | | | | | | | | | | | | | | | | | | | | 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
* * Move members.txt corner cases to unittests.Barry Warsaw2011-04-201-1/+0
| | | | | | | * Fix a case in a list's /members API where the listname is bogus. * Catch NotAMemberError form delete_member() and return not_found. * Refactor REST helpers so that call_api() can be used in unittests without doing any prints to stdout.
* Add REST API for addresses, and change the user REST API to use it whereBarry Warsaw2011-04-192-14/+13
| | | | | | | | | | appropriate. Also: * When an Address instance is created, set its registered_on attribute. * Users may not have a password or real_name, so only include those attributes in the REST API for Users if they are set.
* Add some tests to ensure that the correct number of members are returned whenBarry Warsaw2011-04-173-3/+86
| | | | users are subscribed with their preferred addresses.
* Users can now subscribe to a mailing list, and their preferred address willBarry Warsaw2011-04-173-14/+100
| | | | get delivery.
* Users now have a preferred address which can be set, changed, and deleted.Barry Warsaw2011-04-162-2/+113
| | | | The preferred address must be verified, and controllable by the user.
* Refactor .subscribe() from IAddress to IMailingList.Barry Warsaw2011-04-167-112/+99
|
* Merge passwords into restBarry Warsaw2011-04-084-13/+13
|\
| * encrypt_password(): New convenience function for ensuring that a password isBarry Warsaw2011-04-083-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | both encrypted according to a scheme, and a bytes object. add_member(): Use encrypt_password(). cli_members: Give the user a default, user-friendly password. Of course, this will be encrypted so it can't be retrieved, but it can be reset. Passwords are stored as bytes objects, not unicode now. ConfigLayer: Set the default test password scheme to cleartext. General test repair.
| * add_member()Barry Warsaw2011-04-081-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | - As the most common interface for adding new members (and users), adapt the password storing bit to storing only encrypted passwords in the database. schema.cfg: - Remove the creator_pw_file and site_pw_file as they are obsolete. - Add password_schema key for defining the default password encryption scheme. mailman.sql, user.py: - Store the password as a binary blob instead of as unicode text.
* | Merge passwords into restBarry Warsaw2011-04-082-1/+12
|\|
| * Merge users into passwordsBarry Warsaw2011-04-082-1/+12
| |\
| | * Add an attribute for getting the IUser record from an IMember record. This isBarry Warsaw2011-04-082-1/+12
| | | | | | | | | | | | pure convenience by way of an IUserManager lookup.
* | | Merge passwords into restBarry Warsaw2011-04-071-2/+2
|\| |
| * | make_user_friendly_password(): Ported from Mailman 2.1.Barry Warsaw2011-04-071-2/+2
| |/
* / More fleshing out of the users REST API.Barry Warsaw2011-04-041-1/+4
|/ | | | | | | | | | | | | | * Add a 'uid factory' which allows us to return predictable unique ids for various testing purposes, e.g. user ids. This should work even in the case of cross-subprocess uid generation. * REST access to individual users, or the set of all users. * User objects now have a created_on attribute. * Users can be created through the web, but must have an email address. * Add a [devmode] 'testing' variable for communicating to qrunner subprocesses that we're running in testing mode. This allows us to coordinate factories and such in the qrunner processes. * layers.is_testing() for more consistent API. * Give AddressError a .address attribute for better diagnostics.
* * Re-organize the interface between buildout.cfg and the zope.testing layerBarry Warsaw2011-04-013-19/+29
| | | | | | | | | | | | | | | | | | | initialization. buildout.cfg is now really simple; it calls one method. That method does all the relevant layer initializations. This better localizes what has to be set up before testing can even begin. * IUsers now have a created_on property which contains the datetime at which the user record was created. * Rework the date and uid factories so that they consult the MockAndMonkeyLayer for the current testing flag. Also, those factories register themselves with the layer so that they'll get automatically reset between tests, without the layer actually having to know about them. * Move the User model object initialization into User.__init__() from the user manager. The User now also adds itself to the store. * Add a 'uid factory' for unique id creation, which is test suite aware.
* * Give users a unique, random, immutable user id.Barry Warsaw2011-03-187-17/+67
| | | | | * Find users by user_id via the user manager. * Extend the repr of users to include the user id.
* Eliminate Utils.get_pattern() and in the process, completely revampBarry Warsaw2011-02-252-2/+111
| | | | | | | | | subscription bans so as not to have to rely on BLOBS or pickles in the database. Also, be sure to include .rst files in both doctests and in the packaged tarballs. With the now awesome reST mode for Emacs, I plan to rename all .txt doctest files to .rst.
* Happy New Year.Barry Warsaw2011-01-0118-18/+18
|
* Because it was just to damn confusing, rename IAddress.address toBarry Warsaw2011-01-0111-177/+203
| | | | | | 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.
* * Simplify the membership.txt doctest.Barry Warsaw2010-12-311-142/+77
| | | | | | | * Add test to show that the incoming runner adds all sender addresses to the global user manager. * New doctest helper: dump_list() * Other random cleanups.