4166 Commits

Author SHA1 Message Date
Jessica Tallon
6d36f75f84 Fix all the unit tests and clean up code 2014-10-06 11:48:03 +01:00
Jessica Tallon
b61519ce53 Only have Model.activity for activity compatable objects/targets 2014-09-03 15:58:40 +01:00
Jessica Tallon
0421fc5ee8 Fix migrations and refactor object_type
- Make changes to objectType to be more pythonic "object_type"
- Move object_type to mixins rather than be on the models
- Convert migrations to sqlalchemy core rather than ORM (fix)
- Change TYPES to use descriptive strings rather than numbers
2014-09-02 16:38:52 +01:00
Jessica Tallon
23bf7f3b02 Oops forgot to add medigoblin.tools.federation 2014-08-27 15:32:59 +01:00
Jessica Tallon
ce46470c02 Add ActivityIntermediator table and refactor some of Activity model
- This has introduced a intermediatory table between object/target and
  the activity. This allows for multiple activities to be associated
  with one object/target.
- This moves some of the methods off Activity model into a mixin which
  didn't need to interact with database things.
- This also cleaned up the migrations as well as adding retroactive
  creation of activities for collection creation.
2014-08-27 15:20:27 +01:00
Jessica Tallon
1c15126819 Add better support for targets on Activities
This adds betters upport for targets in the content generation
and on the model itself. Adding getters for properties which would
otherwise require looking up e.g. get_author.
2014-08-26 10:19:39 +01:00
Jessica Tallon
b949201152 Create activity model and add activity creation
This creates the Activity and Genrator models from the Activity
Streams spec and. I then created a migration which retro-actively
create activities for media uploaded and comments created. Through
out the code I've added so automatically activties are created when
a user peforms an action (uploading media, commenting, etc.).
2014-08-22 23:18:01 +01:00
Jessica Tallon
51f4911855 Make blog_post_listing easier to read
This is Elronds change on #948. As 'blog_slug' is always
set in request.matchdict there is no need to do a default-none
get on the dictionary. This change just makes it easier to read.
2014-08-19 14:30:45 +01:00
ayleph
b56cd89eb8 List blogs by URL user rather than request user
The blog_post_listing function in mediagoblin/media_types/blow/views.py
attempts to access blogs based on the requesting user rather than the url
user. This results in server errors when an unauthenticated user attempts to
follow a link from another user's blog post listing, and 404 errors when an
authenticated user attempts to follow a link from another user's blog post
listing.

This change bases blog post listings on the URL user rather than the request
user.
2014-08-19 14:30:45 +01:00
Elrond
3322a63df4 Add docs on collection_add_media hook. 2014-08-19 00:56:37 +02:00
Elrond
7610eb231e Start for documenting core hooks.
This is basicly a start by Chris Webber, I'm just commiting
it for him.
2014-08-19 00:41:21 +02:00
Odin Hørthe Omdal
b694c3de34 Add new hook 'collection_add_media' 2014-08-18 23:18:46 +02:00
Jessica Tallon
9246a6ba89 Tidy up federation code and add tests to cover more of the APIs 2014-08-18 10:51:32 -05:00
Jessica Tallon
32ff6f4dc0 Use oauthlib's safe characters when generating client_key and client_secret 2014-08-18 10:51:15 -05:00
Christopher Allan Webber
a7800e6da8 Fix a python2.6 compatibility issue. Removing a dict comprehension.
This commit sponsored by Christopher Beppler.  Thanks!
2014-08-18 10:40:08 -05:00
Christopher Allan Webber
cbc5f9500c Always remove the session when running check_db_up_to_date()
This commit sponsored by Francois Marier.  Thank you!
2014-08-15 16:30:59 -05:00
Jessica Tallon
8cfa4071bf Forgot to add starttls_config.ini 2014-08-12 21:47:23 +01:00
Jessica Tallon
7ffd4cf4b5 Fix #861 - Add unit test and documentation for email_smtp_force_starttls 2014-08-12 19:23:19 +01:00
Christopher Allan Webber
3b104bbcef Elrond keeps pointing out places I should "is not None" at :) 2014-08-08 13:24:59 -05:00
Christopher Allan Webber
113d1a280e Okay, we don't know that indexes are falsey, so let's make it clearer. Yeek! 2014-08-08 13:18:57 -05:00
Christopher Allan Webber
72f42a408d this negation needs parens. 2014-08-08 13:12:33 -05:00
Christopher Allan Webber
f2a6db9088 Pull the indexes out of the dictionary directly
Instead of checking for their keys and pulling them out later, that is.
2014-08-08 11:39:44 -05:00
Christopher Allan Webber
ed0b981edc If the constraint already exists, roll back to a sane state. 2014-08-08 09:50:16 -05:00
Christopher Allan Webber
1de794c6f0 Explaining why we're committing mid-migration 2014-08-08 09:47:33 -05:00
Christopher Allan Webber
e6288a68e1 Only add the constraint if we need to. Catch an exception if we don't.
Also, updating the comment about sqlite being crazy :)
2014-08-07 16:29:45 -05:00
Christopher Allan Webber
3a8d0e145e Document both migrations, comment out old migration 2014-08-07 15:01:09 -05:00
Christopher Allan Webber
bb12fb807e Add a new migration which removes/fixes the old migration
The previous migration, as it turns out, was not needed, and there
were many inconsistencies put in place by adding it.  See issue #920.

This commit sponsored by Gergő Tisza.  Thank you!
2014-08-07 14:57:46 -05:00
Christopher Allan Webber
18cd6b3015 Committing extracted and compiled translations 2014-08-04 14:17:16 -05:00
Christopher Allan Webber
51a46e43f5 Committing present MediaGoblin translations before pushing extracted messages 2014-08-04 14:17:16 -05:00
Jessica Tallon
8d75091de2 Add more security checks when updating objects and tests 2014-08-04 20:02:18 +01:00
Christopher Allan Webber
bf92ac6d7c Adding Pump API stuff to the docs index.
This commit sponsored by Joel Luellwitz.  Thanks!
2014-08-04 11:55:05 -05:00
Christopher Allan Webber
23002ee77f Set up virtualenv to use py2
This commit sponsored by Jonas Öberg.  Thanks Jonas!
2014-08-03 14:09:31 -05:00
Matt Molyneaux
2d4d24f51e Use the STARTTLS command to upgrade SMTP connections where possible.
Adds the option `email_smtp_force_tls` which will cause `send_email` to error
if it is unable to use the `STARTTLS` command (e.g. where the user knows the
SMTPd supports `STARTTLS` and wishes to protect themselves against a downgrade
attack)

Setting both `email_smtp_user_ssl` and `email_smtp_force_tls` may result in
undefined behaviour if the SMTPd has not been correctly configured.

TODO: Unit tests?
TODO: Documentation?
2014-08-02 16:23:22 -05:00
ayleph
19df857734 Updated video thumbnail pipeline to use decodebin2
The video thumbnailer uses decodebin to automatically detect the file type in the thumbnail pipeline. However, decodebin does not properly demux theora streams, which causes the thumbnailer to fail for .ogv files. decodebin2 properly demuxes the theora stream and successfully creates thumbnails for .ogv files.
2014-08-01 20:15:55 -07:00
Jessica Tallon
8917ffb1e7 Fix some security concerns regrding inpersonation in federation code. 2014-07-31 20:33:04 +01:00
Jessica Tallon
5e5d445890 Fix #927 - Clean up federation code after Elrond's review
- Add json_error and use inplace of json_response where appropriate.
- Add garbage_collection to config spec file.
- Fix bugs in both garbage collection task and test
- Handle /api/whoami when no user logged in and a test for such a case.
- Validate ID is correct and user has comment privilege to comment.
2014-07-30 21:53:52 +01:00
Elrond
138d934f01 Make chown more generic.
Some distributions (ubuntu 14.04 maybe?) don't create a
group for a new user.  So change the "chown" to use the
primary group of the user instead of forcing the group.
This should do the right thing in more cases.

Old: chown mediagoblin:mediagoblin
New: chown mediagoblin:
2014-07-30 19:51:23 +02:00
Jessica Tallon
7bfc81b21a Fix #923 - add allow_admin to user_has_privilege decorator 2014-07-29 20:29:02 +01:00
Christopher Allan Webber
97650abd78 Avoid "lego translations" on the nothing currently featured strings
This commit sponsored by Vinzenz Vietzke.  Thank you!
2014-07-29 13:38:59 -05:00
Christopher Allan Webber
92ce9c0df9 Committing extracted and compiled translations 2014-07-29 11:02:42 -05:00
Christopher Allan Webber
2df7a1b66b Committing present MediaGoblin translations before pushing extracted messages 2014-07-29 11:01:36 -05:00
Laura Arjona Reina
e228876efa Make translatable table columns titles in media processing panel 2014-07-29 11:00:37 -05:00
Laura Arjona Reina
a463fe06ed Make translatable takeaway privileges actions 2014-07-29 11:00:37 -05:00
Laura Arjona Reina
7f50ae1656 Make translatable the titles of TextAreas in moderation form 2014-07-29 11:00:37 -05:00
Laura Arjona Reina
b752085339 Make translatable 'Feature' button in the explanation about how to feature media. 2014-07-29 11:00:37 -05:00
Laura Arjona Reina
b678965727 Make consistent quotation marks when referring to button labels 2014-07-29 11:00:37 -05:00
Laura Arjona Reina
6f8ae21a87 Make translatable some strings that weren't i18n'ed 2014-07-29 11:00:37 -05:00
Christopher Allan Webber
7e0c51af3e Remove the option about whether or not spectrograms are created. They always are.
This commit sponsored by Emily O'Leary.  Thanks, Emily!
2014-07-25 16:02:28 -05:00
Tryggvi Bjorgvinsson
dc19e98d98 Add __unicode__ representation to Notification and MediaCommentMixin
Instead of having __repr__ return a unicode object which it should
not do, we use the __unicode__ method to allow use of Notification
and MediaCommentMixin objects in unicode strings.
2014-07-25 14:37:57 -05:00
Christopher Allan Webber
0e9aa9db14 Adding thallian to the authors list 2014-07-24 12:15:12 -05:00