aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* trac#665: Upgrade to WebTest 2.0.18 and fix broken test `test_csrf_cookie_set`.Ben Sturmfels2015-11-052-3/+3
| | | | | | | | Test was failing due to API change in WebTest around accessing cookies set in the test client. These are now in `test_app.cookies`. While there are currently 48 other tests failing, I've verified that before and after this change that the same number fail. I've also checked that no other tests use the old API for accessing test client cookies. I've pinned to version 2.0.18. My understanding is that it's generally a good idea to pin to a specific version where possible to avoid the "why has this suddenly broken" type bugs. This also seems appropriate since WebTest appears to be very stable.
* Prevent unhandled exception on non-existant user.Ben Sturmfels2015-11-051-13/+15
| | | | | | These changes bring `makeadmin` and `changepw` in-line with the approach used in `deleteuser`. I've also made the error messages more consistent: list the username and full sentences.
* Merge branch 'comments'Jessica Tallon2015-10-2026-344/+754
|\
| * Comment changes for federationJessica Tallon2015-10-2026-344/+754
|/ | | | | | | | | | | | | | This adds a new Comment link table that is used to link between some object and then the comment object, which can be more or less any object in Mediagoblin. The MediaComment has been renamed to TextComment as that more aptly describes what it is. There is migrations for these changes. There is also the conslidation of the Report tables into a single Report table, the same with the Notification objects. This is because both of them split out MediaEntry and Comment versions into their own polymorphic versions from a base, this is no longer a meaningful distinction as comments can be anything.
* Fix #5353 - Bug in OAuth which referenced "user"Jessica Tallon2015-10-173-8/+8
| | | | | | | There was a recent change in 0f3bf8d where several names which were used to refer the actor where renamed to the standard "actor" property name. There were some places in the OAuth decorator and the OAuth views where the old names were still referred. This fixes that.
* Add public_id fixes throughout the codeJessica Tallon2015-10-077-27/+107
| | | | | | | | This adds several things, mainly code which checks for the public id and if it doesn't exist generating it where it can. This is to because we need to keep the public_id to be able to effectively soft delete models. This also adds a public_id field to the Activity along with a migration.
* Add Graveyard modelJessica Tallon2015-10-073-124/+126
| | | | | | | | | | This adds the Graveyard model which is used when a model is deleted, it stores the important "shell" information on the model so it can hard-delete the real object. It also remaps the GenericModelReference references to the new Graveyard model. This also moves the soft deletion setting from __model_args__ to "deletion_mode" on the model.
* Add the __model_args__ deletion codeJessica Tallon2015-10-073-2/+148
| | | | | | | | This adds the "deleted" fields to the models as well as a new __model_args__ section whcih supports the option for changing the deletion type. Deletion is now handled by choosing a deletion method based on the __model_args__["deletion"] setting, for example if it's soft deletion it will call Model.soft_delete()
* Collection changes and migration for federationJessica Tallon2015-10-0748-250/+437
| | | | | | | - Adds a "type" column to the Collection object and allows the CollectionItem model to contain any object. - Changes "items" to "num_items" as per TODO - Renames "uploader", "creator" and "user" to a common "actor" in most places
* Fix bugs with the exifread library updateJessica Tallon2015-10-071-2/+4
| | | | | | | | | | | - As of version 2.1.2 of exifread the 90 CW and 90 CCW values were swapped, this bug is now fixed however our test data had those values swapped too. I have fixed that. - I also noticed that I had different orientation values, this was noticed and fixed for some other differing values in commit ccca39f1 when it was decided we'll add values which were noticed on different platforms.
* Fix #994: Also set self.data when no change made to URL.Ben Sturmfels2015-09-081-1/+2
| | | | This partially reverts 2a1082e3
* Use StringField.process_formdata() if valuelist is empty.Berker Peksag2015-08-251-4/+6
|
* Fix #994: Don't require users to type the website URL scheme when updating ↵Ben Sturmfels2015-08-251-2/+18
| | | | | | | profile. Adds 'http://' if no scheme is provided. Eg. If you enter 'www.example.com', this will be updated to 'http://www.example.com'.
* Issue #815: Replace two non-ASCII curly single quotes with straight quotes.Ben Sturmfels2015-08-251-2/+2
| | | | | | | I don't think there's necessarily anything wrong with using non-ASCII characters, since UTF-8 is basically the de facto standard. There's no reason to mix a small number of curly quotes into a configuration file though, so I've replaced them for consistency.
* Fix some unit tests and bugsJessica Tallon2015-08-2425-82/+87
| | | | | | | | | | | | | | | | | | This fixes a lot of the issues with the LocalUser changes that were merged recently. There was a problem where the attributes of LocalUser were not being eagerly loaded and because the Session was detached an exception was being raised when they were accessed. This also fixes some typo's which were introduced. Finally this adds a temporary fix for a potential SQLAlchemy bug, this is a bug where doing: User.query.filter(LocalUser.username == "some_username").first() does NOT yeild a user with the username "some_username" but all users on the site. The temp fix is to just query the LocalUser, this should be resolved when bug is confirmed and fixed upstream.
* Fix #5344 - OAuth NotImplemented exceptionJessica Tallon2015-08-214-8/+102
| | | | | | | | | | | | This introduces a migration which adds a dummy Client, RequestToken and AccessToken. These are used when an invalid request comes in, instead of bailing early, it needs dummy data to prevent timing attacks. This then implements the methods which get the IDs of the dummy objects. If these are changed in the future a migration which checks for the previous dummy object should be created and updates them to reflect the new IDs/tokens.
* Fix #1066 - OAuth Invalid signature errorJessica Tallon2015-08-201-1/+1
| | | | | | It seems that the GET params on a URL should be included when one signs the request. Mediagoblin was just using the base URL without them. This should fix that.
* Fix serialization after model changesJessica Tallon2015-08-202-10/+11
| | | | | | After the recent model changes there were some bugs which were introduced into the serialization methods of the models. This commit fixes those issues.
* Change structure of MediaEntry and add migrationJessica Tallon2015-08-193-13/+70
| | | | | | This makes the changes needed for federating MediaEntry objects as well as adding the migration and necessary methods to get the public_id just in time (JIT).
* Change codebase to query or create correct User modelJessica Tallon2015-08-191-1/+0
| | | | | | | The code base had many references to User.username and other specific to LocalUser attributes as that was the way it use to exist. This updates those to query on the generic User model but filtering by attributes on the LocalUser.
* Add a no_referrer setting to prevent browsers leaking information.Duncan2015-08-022-0/+6
|
* Fix urlparse import in tools/routing.pyBerker Peksag2015-08-011-1/+1
| | | | | | | urlparse is already a function, so we don't need to specify a module name. Refs #5339
* Add the user models to the MODELS listJessica Tallon2015-07-313-17/+39
| | | | | | | | This adds the two new user models (LocalUser and RemoteUser) to the MODELS list that is in models.py. This stops the strange bug that occurs if you migrate a fresh database, the two models don't exist however migrating an existing database would create them as the migrations exist.
* Change codebase to query or create correct User modelJessica Tallon2015-07-3133-125/+156
| | | | | | | The code base had many references to User.username and other specific to LocalUser attributes as that was the way it use to exist. This updates those to query on the generic User model but filtering by attributes on the LocalUser.
* Add polymorphic properties to UserJessica Tallon2015-07-312-3/+25
| | | | | | | | | | This adds the ability to search for any user based on the generic User case and be given back the specific LocalUser or RemoteUser. This will require any code using the model to look which attributes they are searching on and specify the specific User model they are on if they're not on the generic User model. This will also require new users to be created with LocalUser.
* Add LocalUser and RemoteUser and migrationJessica Tallon2015-07-312-58/+217
|
* Regenerate po file after 8e832f84597bd1505f23f4abd4eef96ce12d3822Berker Peksag2015-07-221-112/+45
|
* Fix typos reported in #1102Berker Peksag2015-07-221-2/+2
|
* Return non-zero exit code if the command cannot be completed successfully.Berker Peksag2015-07-221-0/+6
| | | | Fixes #5084
* Pin mock 1.0.1 in Python 2 for now.Berker Peksag2015-07-221-1/+1
| | | | | | | | | mock recently dropped Python 2.6 support and then re-introduced it in its latest release (however, it's a bit unstable right now). I think at this point, we can be more cautious and just use mock==1.0.1.
* Change all unicode() calls with six.text_type().Berker Peksag2015-06-256-10/+18
| | | | Fixes #5329.
* Fix typo.Berker Peksag2015-06-251-1/+1
|
* Fix more print statements. Refs #5331Berker Peksag2015-06-252-3/+7
|
* Fix print statements to be python3 compatible. Refs #5331Sebastian Spaeth2015-06-251-2/+2
|
* Merge branch Generic Foreign Key changesJessica Tallon2015-06-245-176/+308
|\
| * Fix removal of ActivityIntermediatory migrationJessica Tallon2015-06-242-2/+23
| | | | | | | | | | | | | | | | | | | | The migration had a problem where other tables still referenced the migration as well as a typo in an earlier migration. They have both been fixed and tested on PostgreSQL and SQLite3. This also fixes a bug where sometimes when creating an activity it'd raise an Exception as the object hadn't got an ID. This has been fixed globally with a fix to the create_activity federation tool.
| * Fix some problems with activity mixins and migrationsJessica Tallon2015-05-265-76/+24
| |
| * Add a more verbose GenericForeignKey implementationJessica Tallon2015-05-262-67/+38
| |
| * Remove deprecated fields and fix activity creation in toolsJessica Tallon2015-05-262-11/+2
| |
| * More fixed recommended by ElrondJessica Tallon2015-05-261-11/+8
| | | | | | | | | | | | | | This fixes the problem where GenericForeignKey could only be used with models that are in the core of Mediagoblin, it now can be used with any model that SQLAlchemy knows about, including plugins. This also fixes some small bugs caused by incorrect ordering of params into a function.
| * Add some fixes Elrond suggested and doc stringsJessica Tallon2015-05-261-14/+41
| |
| * Add migration to remove ActivityIntermediatorJessica Tallon2015-05-262-59/+12
| | | | | | | | | | Migration to drop the table and removal of it from the model as it has now been superseeded by the GenericForeignKey field.
| * Fix the GenericForeignKey implementationJessica Tallon2015-05-261-22/+36
| |
| * Migrate Activity to using the new GenericForeignKeyJessica Tallon2015-05-262-47/+166
| |
| * Add GenericForeignKey field and reference helper modelJessica Tallon2015-05-262-2/+93
| |
* | Import urlparse from six.moves to work on both Python 2 and 3.Berker Peksag2015-06-051-1/+3
| |
* | v0.8.0! Let's get this party started!Christopher Allan Webber2015-06-042-2/+2
| |
* | More things to include in MANIFEST.inChristopher Allan Webber2015-06-041-2/+5
| |
* | Note that users have to install node.js :\Christopher Allan Webber2015-06-031-3/+8
| |
* | More adjustments to manifest.inChristopher Allan Webber2015-06-031-1/+4
| | | | | | | | | | | | - include Makefile.in - include configure scripts - graft on devtools