mediagoblin.git
10 years agoI did some more code-keeping in this commit. I added a lot of documentation, so
tilly-Q [Tue, 3 Sep 2013 20:19:07 +0000 (16:19 -0400)]
I did some more code-keeping in this commit. I added a lot of documentation, so
that most of my functions do indeed have effective docstrings. I also changed
the decorators so that they imply eachother in a logical way. I also modified
the one decorator get_media_comment_by_id to be more usable with the variable
urls of mediagoblin.user_pages.views:file_a_report. I also noticed a few tests
had broken, so I went through them and fixed them up, finding that mostly there
were problems in my actual writing of the tests. I also did a few other small
tasks such as creating a new User method to check whether or not a User is ban-
-ned.

===============================================================================
    Added in documentation
===============================================================================
--\  mediagoblin/db/models.py
--\  mediagoblin/decorators.py
--\  mediagoblin/moderation/forms.py
--\  mediagoblin/moderation/tools.py
--\  mediagoblin/moderation/views.py
--\  mediagoblin/user_pages/lib.py

===============================================================================
    Rearranged decorators to be more efficient
===============================================================================
--\  mediagoblin/decorators.py
--| Made it so that user_not_banned is encapsulated in require_active_login
--| Made it so that require_active_login is encapsulated in user_has_privilege
--| Changed get_media_comment_by_id into get_optional_media_comment_by_id. It
  | now returns valid code if the MediaComment id is absent. This makes it pos-
  | -sible to use this decorator for the function:
  |         mediagoblin.user_pages.views:file_a_report

--\  mediagoblin/user_pages/views.py
--| Replaced the mediagoblin.user_pages.views:file_a_comment_report with the
  | decorator mentioned above

--\  mediagoblin/user_pages/routing.py

        -----------------------------------------------------------
        |     took out unnecessary @user_not_banned decorators    |
        -----------------------------------------------------------
--\  mediagoblin/submit/views.py
--\  mediagoblin/user_pages/views.py

===============================================================================
    Fixed broken tests
===============================================================================
--\  mediagoblin/tests/test_auth.py
--\  mediagoblin/tests/test_privileges.py
--\  mediagoblin/tests/test_submission.py

===============================================================================
    Fixed broken code
===============================================================================
--\  mediagoblin/tools/response.py

===============================================================================
    Other Tasks
===============================================================================
--\  mediagoblin/db/models.py
--| Added in User.is_banned() method
--\  mediagoblin/decorators.py
--| Utitilized User.is_banned() method in the user_not_banned decorator

--\  mediagoblin/moderation/views.py
--| Made it impossible for an admin to ban themself.
--| Got rid of a vestigial print statement

--\  mediagoblin/templates/mediagoblin/base.html
--| Made it so the top panel does not show up for users that are banned.

--\  mediagoblin/templates/mediagoblin/moderation/user.html
--| Rearranged the javascript slightly

===============================================================================

10 years agoI've moved on to one of the last phases of my work! Now I'm just checking off
tilly-Q [Tue, 3 Sep 2013 15:57:10 +0000 (11:57 -0400)]
I've moved on to one of the last phases of my work! Now I'm just checking off
items from my last to-do list. The biggest change in this commit is that I made
the moderation reports panel sortable via get request. I also added in page nu-
mbers so that more than 10 reports can be viewed. I'm hoping to go from here to
make a search page. Aside from that, there were only a few other changes I made
this time. I fixed two bugs in my code. I copy-ed and pasted function
mediagoblin.user_pages.views:media_preview_comment which I must've deleted ear-
-lier in a merge. And I moved some of the javascript I was using in the modera-
-tion templates into it's own seperate .js file.

===============================================================================
    Made the moderation reports panel view sortable
===============================================================================
--\ mediagoblin/moderation/forms.py
--\ mediagoblin/moderation/views.py
--\ mediagoblin/templates/mediagoblin/moderation/report_panel.html
--\ mediagoblin/templates/mediagoblin/moderation/user.html
--|  Made `<user> report history` into a link that automatically shows all open
  | and closed reports on <user>.

===============================================================================
    Grabbed some code from master that I accidentally deleted in a merge
===============================================================================
--\ mediagoblin/user_pages/views.py

===============================================================================
    Moved javascript away from templates into its own file
===============================================================================
--\ mediagoblin/static/js/setup_report_forms.js
--\ mediagoblin/templates/mediagoblin/moderation/report.html
--\ mediagoblin/templates/mediagoblin/moderation/user.html

===============================================================================
    Cleared trailing white space
===============================================================================
--\ mediagoblin/templates/mediagoblin/moderation/media_panel.html
--\ mediagoblin/moderation/tools.py
--\ mediagoblin/templates/mediagoblin/meta/terms_of_service.html
--\ mediagoblin/templates/mediagoblin/moderation/report_panel.html
--\ mediagoblin/templates/mediagoblin/user_pages/media.html
--\ mediagoblin/tests/test_modelmethods.py

===============================================================================
    Small fixes
===============================================================================
--\ mediagoblin/templates/mediagoblin/moderation/report.html
--|  Fixed a link so that it points to the correct user page

--\ mediagoblin/templates/mediagoblin/user_pages/media.html
--|  Fixed a bug that crashed this page when a guest visitted it (because
  | request.user is None)

10 years agoThis is a quick commit. I gave admins the ability to ban or unban users
tilly-Q [Thu, 29 Aug 2013 21:31:19 +0000 (17:31 -0400)]
This is a quick commit. I gave admins the ability to ban or unban users
straight from the moderation.users_detail page. I also changed the
UserBan.expiration_date type from DateTime into Date. I also began work on the
Terms of Service, pulled from another website (which will be cited clearly
before I'm done). I added new tests as well for the ban/unbanning. Lastly,
I added a few `user_not_banned` decorators to relevant views, so banned users
cannot access any pages.

10 years agoThis was a big commit! I included lots of documentation below, but generally I
tilly-Q [Thu, 29 Aug 2013 17:47:50 +0000 (13:47 -0400)]
This was a big commit! I included lots of documentation below, but generally I
did a few things. I wrote many many many new tests, either in old test files or
in the three new test files I made. I also did some code-keeping work, deleting
trailing whitespace and deleting vestigial code. Lastly, I fixed the parts of
the code which I realized were broken thru the process of running tests.

===============================================================================
 Deleted trailing whitespace:
===============================================================================
--\  mediagoblin/decorators.py
--\  mediagoblin/auth/tools.py
--\  mediagoblin/db/migrations.py
--\  mediagoblin/db/models.py
--\  mediagoblin/gmg_commands/users.py
--\  mediagoblin/moderation/forms.py
--\  mediagoblin/moderation/tools.py
--\  mediagoblin/moderation/views.py
--\  mediagoblin/templates/mediagoblin/moderation/media_panel.html
--\  mediagoblin/templates/mediagoblin/moderation/report.html
--\  mediagoblin/templates/mediagoblin/moderation/report_panel.html
--\  mediagoblin/templates/mediagoblin/moderation/user.html
--\  mediagoblin/templates/mediagoblin/moderation/user_panel.html
--\  mediagoblin/templates/mediagoblin/user_pages/report.html
--\  mediagoblin/templates/mediagoblin/utils/report.html
--\  mediagoblin/user_pages/lib.py
--\  mediagoblin/user_pages/views.py
===============================================================================
 Deleted Vestigial Code
===============================================================================
--\  mediagoblin/db/util.py
--\  mediagoblin/tests/test_notifications.py
===============================================================================
 Modified the Code:
===============================================================================
--\  mediagoblin/moderation/tools.py
--| Encapsulated the code around giving/taking away privileges into two
  | funtions.

--\  mediagoblin/moderation/views.py
--| Imported and used the give/take away privilege functions
--| Replaced 'require_admin_or_moderator_login' with
  |'user_has_privilege(u"admin")' for adding/taking away privileges, only
  | admins are allowed to do this.

--\  mediagoblin/templates/mediagoblin/banned.html
--| Added relevant translation tags
--| Added ability to display indefinite banning

--\  mediagoblin/templates/mediagoblin/user_pages/media.html
--| Made sure the add comments button was only visible for users with the
  | `commenter` privilege

--\  mediagoblin/tests/test_submission.py
--| Paroneayea fixed a DetachedInstanceError I was having with the our_user
  | function

--\  mediagoblin/tests/tools.py
--| Added a fixture_add_comment_report function for testing.

--\  mediagoblin/tools/response.py
--| Fixed a minor error where a necessary return statement was missing
--| Fit the code within 80 columns

--\  mediagoblin/user_pages/views.py
--| Added a necessary decorator to ensure that only users with the 'commenter'
  | privilege can post comments
===============================================================================
 Wrote new tests for an old test file:
===============================================================================
--\  mediagoblin/tests/test_auth.py
--| Added a new test to make sure privilege granting on registration happens
  | correctly

--\  mediagoblin/tests/test_modelmethods.py*
--| Added a test to ensure the User method has_privilege works properly
===============================================================================
 Wrote entirely new files full of tests:
===============================================================================
--\  mediagoblin/tests/test_moderation.py
--\  mediagoblin/tests/test_privileges.py
--\  mediagoblin/tests/test_reporting.py
===============================================================================
===============================================================================
NOTE: Any files I've marked with a * in this commit report, were actually subm-
itted in my last commit. I made that committ to fix an error I was having, so
they weren't properly documented in that report.
===============================================================================
===============================================================================

10 years agopushing so paroneayea can help me resolve a conflict within the tests.
tilly-Q [Fri, 23 Aug 2013 20:14:36 +0000 (16:14 -0400)]
pushing so paroneayea can help me resolve a conflict within the tests.

10 years agoThis commit was just to fix a few of the errors with the merging and to
tilly-Q [Tue, 20 Aug 2013 19:11:02 +0000 (15:11 -0400)]
This commit was just to fix a few of the errors with the merging and to
make sure that all of the previous tests work fine.

10 years agoMerge branch 'master' into OPW-Moderation-Update
tilly-Q [Tue, 20 Aug 2013 16:21:13 +0000 (12:21 -0400)]
Merge branch 'master' into OPW-Moderation-Update

Conflicts:
mediagoblin/db/models.py
mediagoblin/decorators.py
mediagoblin/routing.py
mediagoblin/user_pages/views.py

10 years agoThis was a very small update, I'm hoping to rebase after this to solve some
tilly-Q [Tue, 20 Aug 2013 16:02:20 +0000 (12:02 -0400)]
This was a very small update, I'm hoping to rebase after this to solve some
other problems. I started looking at the tests in this update. This update I
spent fixing the tests to work with my new code.

--\ mediagoblin/db/migration_tools.py
--| Merging from ticket 679

--\ mediagoblin/db/migrations.py
--| Added unique constraint to Privilege.privilege_name

--\ mediagoblin/db/models.py
--| Deleted vestigial Privilege.is_admin_or_moderator method

--\ mediagoblin/templates/mediagoblin/moderation/user.html
--| Add a `Ban User` / `UnBan User` for admin

--\ mediagoblin/test/test_api.py
--| Fixed test with my new changes

--\ mediagoblin/test/test_auth.py
--| Try to fix test, still having problems

--\ mediagoblin/test/test_modelmethods.py
--| Wrote my first test for the User.has_privilege method

--\ mediagoblin/test/test_modelmethods.py
--| Fixed test with my new changes

--\ mediagoblin/test/test_sqlmigrations.py
--| Merging from ticket 679

--\ mediagoblin/test/tools.py
--| Editted add_fixture_user to allow for privileges rather than active column

10 years agoOops, this accidently slipped in there
Rodney Ewing [Tue, 20 Aug 2013 14:52:12 +0000 (07:52 -0700)]
Oops, this accidently slipped in there

Revert "This patch checks for libs instead of programs in configure.ac for sqlite3 and postgesql."

This reverts commit 26da3271f6e6a880c0418998d5a4e5e71081e1f7.

10 years agouse href='javascript:;' instead of href='#notifications', etc
Rodney Ewing [Tue, 20 Aug 2013 14:18:48 +0000 (07:18 -0700)]
use href='javascript:;' instead of href='#notifications', etc

10 years agoThis patch checks for libs instead of programs in configure.ac for sqlite3 and postgesql.
Rodney Ewing [Tue, 20 Aug 2013 14:03:55 +0000 (07:03 -0700)]
This patch checks for libs instead of programs in configure.ac for sqlite3 and postgesql.

Patch submitted by amirouche

10 years ago- need self.metadata with BaseProcessingFail
Rodney Ewing [Mon, 19 Aug 2013 21:57:00 +0000 (14:57 -0700)]
- need self.metadata with BaseProcessingFail
- pass feed_url into ProcessMedia run()

10 years ago -update to latest master
Rodney Ewing [Mon, 19 Aug 2013 19:58:00 +0000 (12:58 -0700)]
 -update to latest master
- have mg generate task_id

remove

10 years agoRemove specific celery version requirement
Sebastian Spaeth [Thu, 20 Dec 2012 13:09:02 +0000 (14:09 +0100)]
Remove specific celery version requirement

Any celery above 2.5 should work just fine.

10 years agoSwitch deprecated BROKER_HOST to new BROKER_URL
Sebastian Spaeth [Thu, 20 Dec 2012 13:03:16 +0000 (14:03 +0100)]
Switch deprecated BROKER_HOST to new BROKER_URL

People will need to switch that setting in their mediagoblin.ini too.
Make sure we RELEASE NOTE this.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
10 years agoTweak Celery Task
Sebastian Spaeth [Thu, 20 Dec 2012 12:42:37 +0000 (13:42 +0100)]
Tweak Celery Task

- Make sure Exceptions are pickleable (not sure if this was not the
  case but this is the pattern as documented in the celery docs.
- Don't create a task_id in the GMG code, but save the one
  implicitely created by celery.
- Don't create a task-id directory per upload. Just store queued uploads
  in a single directory (this is the most controversial change and might
  need discussion!!!)

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
10 years ago-skip persona test is requests is not installed
Rodney Ewing [Mon, 19 Aug 2013 21:33:07 +0000 (14:33 -0700)]
-skip persona test is requests is not installed
- should use request.urlgen for location

10 years agomedia_confirm_delete: redirect to next, then prev, then user home
Alon Levy [Fri, 16 Aug 2013 08:23:22 +0000 (11:23 +0300)]
media_confirm_delete: redirect to next, then prev, then user home

Instead of redirecting directly to user's home. Makes the flow for mass or just
a few deletions easier. For really large deletions it would still make sense to
have a dedicated view, but this is still way better then losing context by
jumping back to the home view.

Signed-off-by: Alon Levy <alon@pobox.com>
10 years agoload js at the end of the page
Rodney Ewing [Fri, 16 Aug 2013 18:49:33 +0000 (11:49 -0700)]
load js at the end of the page

10 years agouse urlgen
Rodney Ewing [Fri, 16 Aug 2013 18:48:03 +0000 (11:48 -0700)]
use urlgen

10 years agoMerge branch 'auth_docs'
Rodney Ewing [Fri, 16 Aug 2013 17:24:41 +0000 (10:24 -0700)]
Merge branch 'auth_docs'

Conflicts:
docs/source/index.rst

10 years agofix persona tests by using a correct query
Rodney Ewing [Fri, 16 Aug 2013 00:36:56 +0000 (17:36 -0700)]
fix persona tests by using a correct query

10 years agoRemoving PyPump as we aren't using it yet and there's a dependency conflict ;|
Christopher Allan Webber [Thu, 15 Aug 2013 23:29:35 +0000 (18:29 -0500)]
Removing PyPump as we aren't using it yet and there's a dependency conflict ;|

10 years agoMerge branch 'persona_resquash'
Christopher Allan Webber [Thu, 15 Aug 2013 22:07:14 +0000 (17:07 -0500)]
Merge branch 'persona_resquash'

10 years agoRemoving the whitespace betwetween action= and its value
Christopher Allan Webber [Thu, 15 Aug 2013 20:17:02 +0000 (15:17 -0500)]
Removing the whitespace betwetween action= and its value

10 years agoMerge remote-tracking branch 'refs/remotes/tsyesika/master'
Christopher Allan Webber [Thu, 15 Aug 2013 15:34:20 +0000 (10:34 -0500)]
Merge remote-tracking branch 'refs/remotes/tsyesika/master'

New oauth tools!  Heck yeah!

10 years agoFix notifications, which I broke.
Christopher Allan Webber [Wed, 14 Aug 2013 20:57:58 +0000 (15:57 -0500)]
Fix notifications, which I broke.

This commit sponsored by Denver Gingerich.  Thank you!

10 years agoAvoiding the celery warnings that we seem to be confusing people lately.
Christopher Allan Webber [Wed, 14 Aug 2013 20:08:49 +0000 (15:08 -0500)]
Avoiding the celery warnings that we seem to be confusing people lately.

Basically, it's shuffling around the notifications stuff.

This commit sponsored by Günter Kraft.  Thank you!

10 years agoThis has been an update to clean out the code a little bit. The primary change
tilly-Q [Tue, 13 Aug 2013 22:38:00 +0000 (18:38 -0400)]
This has been an update to clean out the code a little bit. The primary change
I made was I added the method has_privilege (which takes a variable amount of
unicode privilege names as an argument) to the User model. This method allowed
for much cleaner checks as to whether or not a user has a privilege. Other-
wise, I also made it impossible for moderators to punish admins. I created a
new url path and three new pages for Users to look at filed reports and the
code of conduct for the mg instance.

=== Made reports on admins not resolvable by moderators:
--\   mediagoblin/moderation/views.py
--\   mediagoblin/templates/mediagoblin/moderation/report.html

=== Created new files for the new pages:
--\   mediagoblin/meta/__init__.py
--\   mediagoblin/meta/routing.py
--\   mediagoblin/meta/views.py
--\   mediagoblin/templates/mediagoblin/meta/code_of_conduct.html
--\   mediagoblin/templates/mediagoblin/meta/reports_details.html
--\   mediagoblin/templates/mediagoblin/meta/reports_panel.html
--\   mediagoblin/routing.py
--\   mediagoblin/static/css/base.css

=== Replaced vestigial methods of checking a user's privilege with the more
====== effective method has_privilege(u'privilege_name'):
--\   mediagoblin/db/models.py
--|   Added in the has_privilege method to the User class

--\   mediagoblin/db/migrations.py
--\   mediagoblin/db/models.py
--\   mediagoblin/decorators.py
--\   mediagoblin/edit/lib.py
--\   mediagoblin/edit/views.py
--\   mediagoblin/gmg_commands/users.py
--\   mediagoblin/moderation/views.py
--\   mediagoblin/templates/mediagoblin/base.html
--\   mediagoblin/templates/mediagoblin/user_pages/collection.html
--\   mediagoblin/templates/mediagoblin/user_pages/media.html
--\   mediagoblin/templates/mediagoblin/user_pages/user.html
--\   mediagoblin/templates/mediagoblin/utils/collection_gallery.html
--\   mediagoblin/user_pages/views.py

=== Minor UI changes
--\   mediagoblin/templates/mediagoblin/moderation/report_panel.html
--\   mediagoblin/templates/mediagoblin/moderation/user.html

=== Other Bugs:
--\   mediagoblin/tools/response.py
--\   mediagoblin/db/migrations.py

10 years agoFix import errors when running tests
Jessica Tallon [Tue, 13 Aug 2013 09:45:09 +0000 (10:45 +0100)]
Fix import errors when running tests

10 years agochange dropdown button to <a> from <div> so that it is tabbable
Rodney Ewing [Fri, 9 Aug 2013 18:38:55 +0000 (11:38 -0700)]
change dropdown button to <a> from <div> so that it is tabbable

10 years agoRevert "slugs are now generated during processing"
Rodney Ewing [Thu, 8 Aug 2013 22:49:51 +0000 (15:49 -0700)]
Revert "slugs are now generated during processing"

This reverts commit 9da4e8049f2de900f7aa12f2fed8c60d6749ff0b.

10 years agoRevert "Leave slug empty until we are sure media processing was successful."
Rodney Ewing [Thu, 8 Aug 2013 22:49:33 +0000 (15:49 -0700)]
Revert "Leave slug empty until we are sure media processing was successful."

This reverts commit f67611fb485b5a84cedc62b73beb1e551e8cb934.

For some reason, generating a slug here throws an integrity error during
a query when there is a duplicate slug.

10 years agoSwitching the MediaGoblin homepage image over to using the "official" gavroche style
Christopher Allan Webber [Thu, 8 Aug 2013 19:15:23 +0000 (14:15 -0500)]
Switching the MediaGoblin homepage image over to using the "official" gavroche style

10 years agoAdd ?next= when trying to add a comment when not logged in
Rodney Ewing [Thu, 8 Aug 2013 18:07:12 +0000 (11:07 -0700)]
Add ?next= when trying to add a comment when not logged in

10 years agoRender 404 if not ajax request
Rodney Ewing [Thu, 8 Aug 2013 00:13:38 +0000 (17:13 -0700)]
Render 404 if not ajax request

10 years agochange interval to 1000ms
Rodney Ewing [Wed, 7 Aug 2013 23:58:06 +0000 (16:58 -0700)]
change interval to 1000ms

10 years agoChanged how the comment was encoded/read.
Emily O'Leary [Tue, 6 Aug 2013 22:22:51 +0000 (18:22 -0400)]
Changed how the comment was encoded/read.
Fixed CSRF + Post with comment preview.
Merged with latest master

10 years agoChanged the target of the markdown links for opening in a new tab as suggested by...
Emily O'Leary [Mon, 25 Mar 2013 18:13:09 +0000 (14:13 -0400)]
Changed the target of the markdown links for opening in a new tab as suggested by joar.

10 years agoAdded i18n to my javascript changes as per trac #417
Emily O'Leary [Mon, 25 Mar 2013 02:16:12 +0000 (22:16 -0400)]
Added i18n to my javascript changes as per trac #417

10 years agoAdded comment preview functionality to user pages. It works by passing the comment...
Emily O'Leary [Mon, 25 Mar 2013 01:42:42 +0000 (21:42 -0400)]
Added comment preview functionality to user pages. It works by passing the comment's value as a JSON string to a new handler that lives at /ajax/comment/preview. The query string is decoded, unquoted, and has its leading and trailing quotes removed to match the input that cleaned_markdown_conversion expects.

It does this in real time with a 500ms lag by using a timer. Initially I tried the onChange handler but you need to lose focus for that to process. The javascript timer is only invoked if the add comment button is pressed. A request is only sent if the comment box is not empty and the current value is not the same as the last value.

10 years agoslugs are now generated during processing
Rodney Ewing [Wed, 7 Aug 2013 23:19:57 +0000 (16:19 -0700)]
slugs are now generated during processing

10 years agoLeave slug empty until we are sure media processing was successful.
Rodney Ewing [Wed, 7 Aug 2013 23:15:27 +0000 (16:15 -0700)]
Leave slug empty until we are sure media processing was successful.

Patch submitted by LotusEcho

10 years ago * create config option for optional jinja2 extensions
Kenneth Dombrowski [Sat, 11 May 2013 21:30:43 +0000 (17:30 -0400)]
 * create config option for optional jinja2 extensions
 * add comments & clarify code for jinja2 extensions

Conflicts:
mediagoblin/config_spec.ini

10 years agoUse the workbench for video processing.
Rodney Ewing [Wed, 7 Aug 2013 22:31:40 +0000 (15:31 -0700)]
Use the workbench for video processing.
Patch submitted by Kushal

10 years agoautoplay is now by default False for videos.
Christopher Allan Webber [Wed, 7 Aug 2013 20:03:37 +0000 (15:03 -0500)]
autoplay is now by default False for videos.

This commit sponsored by Vasili Sviridov.  Thank you!

10 years agoMerge branch 'merge-pyconfigure'
Christopher Allan Webber [Wed, 7 Aug 2013 16:57:12 +0000 (11:57 -0500)]
Merge branch 'merge-pyconfigure'

Conflicts:
docs/source/siteadmin/deploying.rst

10 years agotypo fix in foundations branch
Rodney Ewing [Fri, 2 Aug 2013 14:31:09 +0000 (07:31 -0700)]
typo fix in foundations branch

10 years agoMerge remote-tracking branch 'tilly-q/ticket-679'
Rodney Ewing [Fri, 2 Aug 2013 14:28:35 +0000 (07:28 -0700)]
Merge remote-tracking branch 'tilly-q/ticket-679'

10 years agoI added a few more unitests in this commit. It now confirms that even after mi-
tilly-Q [Thu, 1 Aug 2013 00:50:38 +0000 (20:50 -0400)]
I added a few more unitests in this commit. It now confirms that even after mi-
-gration, there is only one of each Foundation object.

10 years agoMerge branch 'ticket-679' of gitorious.org:~npigeon/mediagoblin/npigeons-mediagoblin
tilly-Q [Thu, 1 Aug 2013 00:49:07 +0000 (20:49 -0400)]
Merge branch 'ticket-679' of gitorious.org:~npigeon/mediagoblin/npigeons-mediagoblin

10 years agoIn this commit I added a few unittests to account for Foundations. There were
tilly-Q [Tue, 30 Jul 2013 23:42:26 +0000 (19:42 -0400)]
In this commit I added a few unittests to account for Foundations. There were
only a few tests I had to add to mediagoblin/tests/test_sql_migrations.py beca-
-use the foundation creation only happens at database initialization.

10 years agoThis commit was the work I did fixing errors that cropped up from the merge.
tilly-Q [Tue, 30 Jul 2013 21:09:01 +0000 (17:09 -0400)]
This commit was the work I did fixing errors that cropped up from the merge.
There were a few errors because of the switch from sqlalchemy 0.7 to 0.8 but I
cleared them up.

10 years agoMerge commit 'refs/merge-requests/55' of git://gitorious.org/mediagoblin/mediagoblin...
Rodney Ewing [Wed, 31 Jul 2013 22:27:22 +0000 (15:27 -0700)]
Merge commit 'refs/merge-requests/55' of git://gitorious.org/mediagoblin/mediagoblin into 55

Conflicts:
docs/source/siteadmin/relnotes.rst

10 years agominor styling updates to docs
Rodney Ewing [Wed, 31 Jul 2013 22:16:52 +0000 (15:16 -0700)]
minor styling updates to docs

10 years agoMerge commit 'refs/merge-requests/59' of git://gitorious.org/mediagoblin/mediagoblin...
Rodney Ewing [Wed, 31 Jul 2013 22:07:44 +0000 (15:07 -0700)]
Merge commit 'refs/merge-requests/59' of git://gitorious.org/mediagoblin/mediagoblin into merge-requests/59

10 years agoStarting to write unit tests...
tilly-Q [Tue, 30 Jul 2013 23:06:26 +0000 (19:06 -0400)]
Starting to write unit tests...

10 years agoMerge branch 'ticket-679' into OPW-Moderation-Update
tilly-Q [Mon, 29 Jul 2013 22:40:19 +0000 (18:40 -0400)]
Merge branch 'ticket-679' into OPW-Moderation-Update

Conflicts:
mediagoblin/auth/tools.py
mediagoblin/auth/views.py
mediagoblin/db/migration_tools.py
mediagoblin/db/migrations.py
mediagoblin/db/models.py
mediagoblin/decorators.py
mediagoblin/user_pages/views.py

10 years agoWhy isn't .ogg in this list? A comment explains... it's detected by sniffing!
Christopher Allan Webber [Mon, 29 Jul 2013 21:50:29 +0000 (16:50 -0500)]
Why isn't .ogg in this list?  A comment explains... it's detected by sniffing!

This commit sponsored by Tom Marble.  Thanks Tom!

10 years agoI actually had to do a bit more work than I thought, because I needed to account
tilly-Q [Mon, 29 Jul 2013 21:15:29 +0000 (17:15 -0400)]
I actually had to do a bit more work than I thought, because I needed to account
for plugins. In this commit I changed the MigrationManager and DatabaseData ob-
jects to account for FOUNDATIONS in any plugin's (or main program's) models.py
file.

10 years agoThis was a very simple ticket actually. I created a list called FOUNDATIONS in
tilly-Q [Mon, 29 Jul 2013 20:36:06 +0000 (16:36 -0400)]
This was a very simple ticket actually. I created a list called FOUNDATIONS in
mediagoblin/db/models.py. This list holds all of the information about rows that
should be created at database initialization. Read the documentation near the
FOUNDATIONS list to understand the proper format for this list.

All of the work is done through a new method on MigrationManager in
mediagoblin/db/migrations_tools.py. This method, `populate_table_foundations`
parses the FOUNDATIONS list and creates the foundations based on the data incl-
uded. This only ever happens when the database is initialized. Migrations to
releases with new Foundations should be very easy just using the basic
database functionality.

10 years agoThis is a very small commit. All that I have done here is to clean up my code
tilly-Q [Mon, 29 Jul 2013 19:14:39 +0000 (15:14 -0400)]
This is a very small commit. All that I have done here is to clean up my code
a bit. I made it so that mediagoblin.user_pages.report recieves the report
form as part of it's context. I also made sure I used {% trans %} tags effect-
-ively.

10 years agobabel 1.0 doesn't have a localedata.list() method, so updated setup.py.
Rodney Ewing [Mon, 29 Jul 2013 18:25:34 +0000 (11:25 -0700)]
babel 1.0 doesn't have a localedata.list() method, so updated setup.py.

made "import crypto" fully qualified

10 years agoFix problem causing exception when invalid Authentication header provided
xray7224 [Mon, 29 Jul 2013 16:48:53 +0000 (17:48 +0100)]
Fix problem causing exception when invalid Authentication header provided

10 years agoFix problem with routing to oauth
xray7224 [Mon, 29 Jul 2013 16:28:50 +0000 (17:28 +0100)]
Fix problem with routing to oauth

10 years agoFixes problem with headers pointing to old federation dir
xray7224 [Mon, 29 Jul 2013 16:25:10 +0000 (17:25 +0100)]
Fixes problem with headers pointing to old federation dir

10 years agoThis commit had some important milestones in it. The major update is that now I
tilly-Q [Sat, 27 Jul 2013 20:44:40 +0000 (16:44 -0400)]
This commit had some important milestones in it. The major update is that now I
have mostly completed the moderator punishment and resolution of reports. Along
with this, I have also added one last table to the database: one that holds ar-
-chived (or resolved) reports. This is some of the primary functionality of my
whole update, so this is a big step! The other changes I made this update are
primarily organizational. I refactored some of my code into functions and I cl-
eaned up many of my templates.

--\ mediagoblin/db/models.py
--| Created the new ArchivedReport table
--| Removed columns from BaseReport table that are only necessary for Archived
  |    reports

--\ mediagoblin/db/migrations.py
--| Created the new ArchivedReport table
--| Removed columns from BaseReport table that are only necessary for Archived
  |    reports

--\ mediagoblin/db/util.py
--| Created the user_privileges_to_dictionary function. This is useful for
  |    accessing a user's permissions from within a template.

--\ mediagoblin/moderation/forms.py
--| Expanded the disciplinary actions a moderator can take
--| Allowed the moderator to choose more than one disciplinary action at a time
  |    (It's now managed with a list of checkboxes rather than radio buttons)
----| Pulled a MultiCheckBox class from  a wtforms tutorial
--| Added various other form inputs for details of the moderator's disciplinary
  |    actions
--| Tried to ensure that every string is unicode and translated

--\ mediagoblin/moderation/tools.py
--| Created this file for holding useful moderation tools
--| Moved the penalizing code from views to the function take_punitive_actions
--| Added many more types of punitive actions
--| Added the archiving of old reports

--\ mediagoblin/moderation/views.py
--| Used the privileges_to_dictionary function for the Users Detail view to
  |   allow for different actions available to a moderator and an admin.
--| Added in functionality for ArchivedReports to the reports_detail and
  |   reports_panel views
--| Moved the punishments of repots_detail to tools.py (as mentioned above)

--\ mediagoblin/static/css/base.css
--| Added new styling for the User Detail page

--\ mediagoblin/static/images/icon_clipboard_alert.png
--| Added this image to represent unresolved reports

--\ mediagoblin/templates/mediagoblin/moderation/report.html
--| Added 'Return to Reports Panel' button
--| Fixed the spacing to be less that 80 columns wide
--| Added in display for Archived Reports

--\ mediagoblin/templates/mediagoblin/moderation/reports_panel.html
--| Changed the placement and columns of the tables
--| Fixed the spacing to be less that 80 columns wide
--| Added in display for Archived Reports

--\ mediagoblin/templates/mediagoblin/moderation/user.html
--| Fixed the spacing to be less that 80 columns wide
--| Took away the moderator's ability to add and remove privileges at will.
  |  Only the admin has this power now.

--\ mediagoblin/templates/mediagoblin/moderation/users_panel.html
--| Fixed the spacing to be less that 80 columns wide

--\ mediagoblin/tools/response.py
--| Added in code to remove a UserBan from a User if that user logs in after
  |  the expiration date

10 years agoSet up in-package virtualenv via make
Christopher Allan Webber [Thu, 25 Jul 2013 20:15:49 +0000 (15:15 -0500)]
Set up in-package virtualenv via make

10 years agoRemoving aclocal.m4, which is autogenerated
Christopher Allan Webber [Thu, 25 Jul 2013 19:56:08 +0000 (14:56 -0500)]
Removing aclocal.m4, which is autogenerated

10 years agoAdding .gitignore for pyconfigure/automake generated files
Christopher Allan Webber [Thu, 25 Jul 2013 19:53:18 +0000 (14:53 -0500)]
Adding .gitignore for pyconfigure/automake generated files

10 years agoMoving setup.py.in back to setup.py
Christopher Allan Webber [Thu, 25 Jul 2013 19:34:48 +0000 (14:34 -0500)]
Moving setup.py.in back to setup.py

10 years agoMerge remote-tracking branch 'refs/remotes/brandoninvergo/pyconfigure' into merge...
Christopher Allan Webber [Thu, 25 Jul 2013 19:29:30 +0000 (14:29 -0500)]
Merge remote-tracking branch 'refs/remotes/brandoninvergo/pyconfigure' into merge-pyconfigure

10 years agoMore up to date README
Christopher Allan Webber [Thu, 25 Jul 2013 19:05:50 +0000 (14:05 -0500)]
More up to date README

10 years agoMove the "cd mediagoblin" to the right line. Thanks usrnix!
Christopher Allan Webber [Wed, 24 Jul 2013 01:24:30 +0000 (20:24 -0500)]
Move the "cd mediagoblin" to the right line.  Thanks usrnix!

This commit sponsored by Kenneth Dombrowski.  Thanks!

10 years agoRenames OAuth1 code to federation
xray7224 [Mon, 22 Jul 2013 16:06:00 +0000 (17:06 +0100)]
Renames OAuth1 code to federation

10 years agoRefactor WTFormData
xray7224 [Mon, 22 Jul 2013 15:56:22 +0000 (16:56 +0100)]
Refactor WTFormData

10 years agoFix problem with migration - OAuth
Jessica Tallon [Mon, 22 Jul 2013 16:17:01 +0000 (17:17 +0100)]
Fix problem with migration - OAuth

10 years agoFixes some typo's and removes unused imports
Jessica Tallon [Sat, 20 Jul 2013 18:08:02 +0000 (19:08 +0100)]
Fixes some typo's and removes unused imports

10 years agoMoves first versions of the the models to migrations
xray7224 [Thu, 18 Jul 2013 19:39:15 +0000 (20:39 +0100)]
Moves first versions of the the models to migrations

10 years agoAdds migration for OAuth1 tables
xray7224 [Thu, 18 Jul 2013 19:21:35 +0000 (20:21 +0100)]
Adds migration for OAuth1 tables

10 years agoAdds test for request_tokens
xray7224 [Thu, 18 Jul 2013 18:15:05 +0000 (19:15 +0100)]
Adds test for request_tokens

10 years agoWhew. This is a big update. I did some significant keeping work. I moved all of
tilly-Q [Wed, 17 Jul 2013 20:16:07 +0000 (16:16 -0400)]
Whew. This is a big update. I did some significant keeping work. I moved all of
the folders and enpoints labeled 'admin' to the more accurate term of 'moderat-
ion.' I also created the ability for admins and moderators to add or remove pr-
ivileges or to ban a user in response to a report. This also meant implementing
the UserBan class in various places. I also had to add a column called result
to the ReportBase table. This allows the moderator/admin to leave comments when
they respond to a report, allowing for archiving of what responses they do/n't
take.

--\ mediagoblin/db/migrations.py
--| Added result column to ReportBase

--\ mediagoblin/db/models.py
--| Added result column to ReportBase
--| Added documentation to tables I had made previously

--\ mediagoblin/decorators.py
--| Editted the user_has_privilege decorator to check whether a user has been
  | banned or not
--| Created a seperate user_not_banned decorator to prevent banned users from
  | accessing any pages
--| Changed require_admin_login into require_admin_or_moderator login

--\ mediagoblin/gmg_commands/users.py
--| Made the gmg command `adduser` create a user w/ the appropriate privileges

--\ mediagoblin/moderation/routing.py  << formerly mediagoblin/admin/routing.py
--| Renamed all of the routes from admin -> moderation

--\ mediagoblin/routing.py
--| Renamed all of the routes from admin -> moderation

--\ mediagoblin/moderation/views.py << formerly mediagoblin/admin/views.py
--| Renamed all of the routes & functions from admin -> moderation
--| Expanded greatly on the moderation_reports_detail view and functionality
--| Added in the give_or_take_away_privilege form, however this might be a use-
  | -less function which I could remove (because privilege changes should happe-
  | n in response to a report so they can be archived and visible)

--\ mediagoblin/static/css/base.css
--| Added in a style for the reports_detail page

--\ mediagoblin/templates/mediagoblin/base.html
--| Renamed all of the routes from admin -> moderation

--\ mediagoblin/templates/mediagoblin/moderation/report.html
--| Added form to allow moderators and admins to respond to reports.

--\ mediagoblin/templates/mediagoblin/moderation/reports_panel.html
--| Fixed the table for closed reports

--\ mediagoblin/templates/mediagoblin/moderation/user.html
--| Added in a table w/ all of the user's privileges and the option to add or
  | remove them. Again, this is probably vestigial
--| Renamed all of the routes from admin -> moderation

--\ mediagoblin/templates/mediagoblin/moderation/user_panel.html
--| Renamed all of the routes from admin -> moderation

--\ mediagoblin/tools/response.py
--| Added function render_user_banned, this is the view function for the redir-
  | -ect that happens when a user tries to access the site whilst banned

--\ mediagoblin/user_pages/forms.py
--| Added important translate function where I had text

--\ mediagoblin/user_pages/lib.py
--| Renamed functiion for clarity

--\ mediagoblin/user_pages/views.py
--| Added the user_not_banned decorator to every view

--\ mediagoblin/views.py
--| Added the user_not_banned decorator

--\ mediagoblin/moderation/forms.py
--| Created this new file

--\ mediagoblin/templates/mediagoblin/banned.html
--| Created this new file
--| This is the page which people are redirected to when they access the site
  | while banned

10 years agoAdds some tests for the OAuth and some docs
xray7224 [Tue, 16 Jul 2013 18:19:49 +0000 (19:19 +0100)]
Adds some tests for the OAuth and some docs

10 years agoFixing docs: git submodule update, not git submodule fetch!
Christopher Allan Webber [Mon, 15 Jul 2013 02:05:01 +0000 (21:05 -0500)]
Fixing docs: git submodule update, not git submodule fetch!

This commit sponsored by Charles Combs.  Thank you!

10 years agoFixes tests
xray7224 [Sun, 14 Jul 2013 18:00:52 +0000 (19:00 +0100)]
Fixes tests

10 years agoMerge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin
xray7224 [Sun, 14 Jul 2013 16:31:03 +0000 (17:31 +0100)]
Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin

10 years agoSkip the openid tests if the openid module is not installed.
Christopher Allan Webber [Sun, 14 Jul 2013 16:23:52 +0000 (11:23 -0500)]
Skip the openid tests if the openid module is not installed.

This commit sponsored by Brandon Smith.  Thank you!

10 years agoUsing nonce now, preventing OAuth replay attacks
xray7224 [Sun, 14 Jul 2013 15:24:04 +0000 (16:24 +0100)]
Using nonce now, preventing OAuth replay attacks

10 years agoMerge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin
xray7224 [Sun, 14 Jul 2013 14:27:52 +0000 (15:27 +0100)]
Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblin

10 years agoDocumenting the media_manager fetching hook
Christopher Allan Webber [Fri, 12 Jul 2013 22:13:48 +0000 (17:13 -0500)]
Documenting the media_manager fetching hook

This commit sponsored by Christian Corrodi.  Thank you!

10 years agoSwitching the hook 'get_media_manager' to a more "directed" tuple-hook
Christopher Allan Webber [Fri, 12 Jul 2013 22:04:08 +0000 (17:04 -0500)]
Switching the hook 'get_media_manager' to a more "directed" tuple-hook

By switching this to a tuple that includes the media type in the key
itself, this requires iteration and execution of functions that
"check" that they are the right type.

This commit sponsored by Greg Grossmeier.  Thanks buddy! :)

10 years agodocumenting the new media_type plugins and available hooks
Rodney Ewing [Fri, 12 Jul 2013 18:57:16 +0000 (11:57 -0700)]
documenting the new media_type plugins and available hooks

10 years agoMerge branch 'rodney757-media_plugins'
Christopher Allan Webber [Fri, 12 Jul 2013 21:24:36 +0000 (16:24 -0500)]
Merge branch 'rodney757-media_plugins'

Conflicts:
mediagoblin.ini
mediagoblin/tests/test_mgoblin_app.ini

10 years agoFix the last bit preventing all the unit tests from passing in media types->plugins
Christopher Allan Webber [Fri, 12 Jul 2013 20:52:20 +0000 (15:52 -0500)]
Fix the last bit preventing all the unit tests from passing in media types->plugins

The last commit was also small, so Jeff Moe gets... two!  Two sponsored commits!
Ah ah ah. </count_voice>

10 years agoSwitch the import of the image media manager over to the new class
Christopher Allan Webber [Fri, 12 Jul 2013 19:53:10 +0000 (14:53 -0500)]
Switch the import of the image media manager over to the new class

This helps resolve one of the remaining issues with the tests for the
media type pluginification.

This commit sponsored by Jeffrey Moe.  Thanks Jeff!  Lulzbot rocks!

10 years agoChanging the information spat out while printing from media types->plugins
Christopher Allan Webber [Fri, 12 Jul 2013 19:16:47 +0000 (14:16 -0500)]
Changing the information spat out while printing from media types->plugins

Previously it called even plugins media types.  Ha!

This commit sponsored by Jon Merkley.  Thank you!

10 years agoPatch by Strum. Remove redundent tool-tips from Stl media_type
Rodney Ewing [Fri, 12 Jul 2013 16:51:42 +0000 (09:51 -0700)]
Patch by Strum. Remove redundent tool-tips from Stl media_type

10 years agoPatch by pythonsnake. Make mediagoblin.ini comments more helpful.
Rodney Ewing [Fri, 12 Jul 2013 16:32:50 +0000 (09:32 -0700)]
Patch by pythonsnake. Make mediagoblin.ini comments more helpful.

10 years agomake change_pass page autofocus
Rodney Ewing [Thu, 11 Jul 2013 23:33:33 +0000 (16:33 -0700)]
make change_pass page autofocus

10 years agoforgot to render errors
Rodney Ewing [Thu, 11 Jul 2013 23:21:35 +0000 (16:21 -0700)]
forgot to render errors