aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/user_pages
Commit message (Collapse)AuthorAgeFilesLines
* Fix #5514 - Add to Collection causes server errorayleph2017-08-151-7/+7
| | | | | | Re-arrange code to check whether a collection has been selected prior to checking whether an item already exists in the selected collection. This fixes a regression introduced in 0f3bf8d.
* Fix #5513 - Can't delete blog post draftsayleph2017-08-151-0/+8
| | | | | | | | | | Modify the @get_media_entry_by_id decorator to return media regardless of processing state. Separately modify all view functions that use the @get_media_entry_by_id decorator to require that the media be in the processed state, other than for the media_confirm_delete view. This allows blog post drafts to be deleted without returning a 404. Further, it adds the ability to delete unprocessed media in the future, which would be a nice addition to the user processing panel.
* Fix #5500 UnicodeEncodeError in atom feedAndrew Browning2017-02-141-1/+1
| | | | | | This simple fix allows unicode strings in the atom feed thumb and description fields by forcing the entire atom content string to unicode.
* Apply consistency & PEP8 to atom feedsAndrew Browning2016-11-041-20/+28
| | | | | | | This patch applies the atom feed thumbnail changes from 65d8ca7 to user atom feeds and rearranges the code in both views for better consistency with PEP8 and with each other. It also fixes a spacing issue with the feed title on the main page.
* Fix #5451 - add_message inconsistenciesAndrew Browning2016-04-021-24/+49
| | | | | Reformat add_message function calls for consistency and PEP8 line continuations.
* Fix comment ID links on media comment report pageAndrew Browning2016-03-051-1/+1
| | | | | Change the comment ID behaviour and source of user_pages/report.html to match user_pages/media.html as of #5376.
* Change Notification.object_id to be ID of Comemnt not TextCommentJessica Tallon2016-02-291-1/+1
| | | | | | | | This shouldn't really effect much but it is a needed change for the future this changes the Notification.object_id to be the ID of the Comment (the link table to the comment object) rather than TextComment (the comment object itself). This is needed as now comments can be other things, other than TextComment.
* Change `uploader` to `actor`Boris Bobrov2016-02-011-1/+1
| | | | | Class User doesn't have field `uploader` any more, instead there `actor`. Fix several uses of `uploader` to `actor`.
* some fixes to the panel looksBoris Bobrov2016-02-011-2/+9
|
* added filtering by entry state in processing panelBoris Bobrov2016-02-012-1/+13
|
* removed querying of unused metrics in media panelBoris Bobrov2016-01-281-20/+0
|
* processing panel new looksBoris Bobrov2016-01-281-1/+5
|
* Fix issue 5371 broken collection atom feedsayleph2016-01-061-2/+2
| | | | Signed-off-by: Jessica Tallon <tsyesika@tsyesika.se>
* Comment changes for federationJessica Tallon2015-10-202-30/+30
| | | | | | | | | | | | | | 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.
* Add public_id fixes throughout the codeJessica Tallon2015-10-071-0/+15
| | | | | | | | 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.
* Collection changes and migration for federationJessica Tallon2015-10-072-52/+61
| | | | | | | - 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
* Change codebase to query or create correct User modelJessica Tallon2015-07-311-8/+8
| | | | | | | 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.
* wtforms.fields.TextField was deprecatedJakob Kramer2015-03-121-1/+1
| | | | | | | WTForms documentation: > The TextField alias for StringField is deprecated. Signed-off-by: Berker Peksag <berker.peksag@gmail.com>
* Change 'federation' name to 'api' which is more suitableJessica Tallon2015-02-152-1/+36
|
* Fix #1017 - Exception caused by activity being set on incorrect foreign keyJessica Tallon2014-10-291-4/+3
| | | | | | | | | | The .activity ForeignKey on several models such as MediaEntry expects a ActivityIntmediatory ID not an Activity ID however in submit code the activity attribute was being set the Activity, simply removing this assignment should fix the issue as everything is set correctly at this point. I have also moved the creation of the activity above the processing of media to avoid race conditions.
* Merge branch '905-activities'Jessica Tallon2014-10-071-2/+4
|\ | | | | | | | | | | Add Activity and Generator models which allow for activities to be created. This now works with the feed API.
| * Add __repr__ to Activity and Generator classJessica Tallon2014-10-071-1/+1
| |
| * Fix all the unit tests and clean up codeJessica Tallon2014-10-061-3/+3
| |
| * Add better support for targets on ActivitiesJessica Tallon2014-08-261-1/+1
| | | | | | | | | | | | 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.
| * Create activity model and add activity creationJessica Tallon2014-08-221-2/+4
| | | | | | | | | | | | | | | | 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.).
* | Merge branch 'master' into merge-python3-portChristopher Allan Webber2014-09-163-10/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Has some issues, will iteratively fix! Conflicts: mediagoblin/gmg_commands/__init__.py mediagoblin/gmg_commands/deletemedia.py mediagoblin/gmg_commands/users.py mediagoblin/oauth/views.py mediagoblin/plugins/api/views.py mediagoblin/tests/test_api.py mediagoblin/tests/test_edit.py mediagoblin/tests/test_oauth1.py mediagoblin/tests/test_util.py mediagoblin/tools/mail.py mediagoblin/webfinger/views.py setup.py
| * Add new hook 'collection_add_media'Odin Hørthe Omdal2014-08-181-7/+9
| |
| * Fixes #899 : DeprecationWarning about Required going away in WTForms 3.0. ↵Loïc Le Ninan2014-06-131-3/+3
| | | | | | | | Replaced Required with InputRequired.
| * Merge branch 'metadata' of gitorious.org:mediagoblin/cwebbers-mediagoblin ↵tilly-Q2014-05-122-6/+2
| |\ | | | | | | | | | | | | | | | | | | into metadata Conflicts: mediagoblin/plugins/metadata_display/templates/mediagoblin/plugins/metadata_display/metadata_table.html
| | * Move the metadata display table over to being contained in a pluginChristopher Allan Webber2014-05-122-6/+2
| | |
| * | Created the media metadata editor pagetilly-Q2014-05-061-0/+4
| |/
| * Created the basic structure of the metadata display table in rdfa litetilly-Q2014-04-212-2/+6
| |
* | Use six.text_type instead of unicode().Berker Peksag2014-06-021-2/+4
|/ | | | I will be switch to use ``from __future__ import unicode_literals`` later.
* Adding a general purpose context hook for the media display page.Christopher Allan Webber2014-04-071-5/+15
| | | | | | | | Since the media template name gets swapped out for each media type, normal context hooks don't work if you want to affect all media displays. This gives a general purpose hook. This commit sponsored by Kẏra. Thanks! :)
* Undo changes since gsoc in media_confirm_deleteSebastian Spaeth2013-12-121-22/+4
| | | | | | Since the Gsoc the use of decorators has simplified this function. Reintroduce the same code as before Adidits blog branch made these changes.
* Convert blog plugin to use new privileges systemSebastian Spaeth2013-12-121-1/+1
| | | | | there is no user.is_admin anymore. Adapt to use the new privileges system.
* Merge branch 'master' into upstream-masterSebastian Spaeth2013-12-121-4/+22
|\ | | | | | | | | | | Conflicts: mediagoblin/templates/mediagoblin/base.html mediagoblin/templates/mediagoblin/user_pages/user.html
| * Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblinAditi Mittal2013-09-181-0/+5
| |\
| * \ Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblinAditi2013-08-251-2/+3
| |\ \
| * \ \ Resolve merge conflict and merge.Aditi2013-08-221-2/+6
| |\ \ \
| * \ \ \ Merge branch 'master' of git://gitorious.org/mediagoblin/mediagoblinAditi2013-08-093-3/+22
| |\ \ \ \
| * | | | | Add delete error for failed type.Aditi2013-08-091-2/+6
| | | | | |
| * | | | | Make media_confirm_delete to work for failed media entries too.Aditi2013-08-081-4/+18
| | | | | |
* | | | | | I went through the code and just removed some blank spaces. I also looked ittilly-Q2013-11-191-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | thru and it looked great.
* | | | | | Addressed ticket number 630 by removing MediaEntry.collectedJosie2013-11-182-4/+2
| | | | | |
* | | | | | Merge remote-tracking branch 'refs/remotes/tilly-q/OPW-Moderation-Update'Christopher Allan Webber2013-10-074-23/+127
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mediagoblin/templates/mediagoblin/user_pages/user.html mediagoblin/tests/test_auth.py mediagoblin/tests/test_submission.py
| * | | | | | This commit was solely to remove unused imports in the code that I have writtentilly-Q2013-09-231-2/+1
| | | | | | |
| * | | | | | At this point, I am very close to done with this code! I made one big change attilly-Q2013-09-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | paroneayea's request, which was to make to possible to turn off user's ability to file reports through a mediagoblin.ini setting. Aside from this, I had to make it possible for the Moderation User Panel to display more than 10 users. And aside from that, I just had to fix some errors which cropped up with my most recent additions. I also fixed some tests that were broken because I had changed the checks for whether or not a user is active. Nearing the end! =============================================================================== Made it possible to turn off reports through a mediagoblin.ini setting =============================================================================== --\ mediagoblin.ini --\ mediagoblin/config_spec.ini --\ mediagoblin/decorators.py --\ mediagoblin/moderation/views.py --\ mediagoblin/templates/mediagoblin/user_pages/media.html --\ mediagoblin/user_pages/views.py =============================================================================== Made User Panel capable of showing more than 1 page of users =============================================================================== --\ mediagoblin/moderation/forms.py --\ mediagoblin/moderation/views.py --\ mediagoblin/templates/mediagoblin/moderation/user_panel.html =============================================================================== Fixed Broken Tests =============================================================================== --\ mediagoblin/tests/test_notifications.py --\ mediagoblin/tests/test_openid.py --\ mediagoblin/tests/test_persona.py --\ mediagoblin/tests/test_reporting.py =============================================================================== Fixed errors in code =============================================================================== --\ mediagoblin/db/migrations.py --| Set nullable to True for MediaReports' and CommentReports' content foreign |keys --\ mediagoblin/db/models.py --| Got rid of cascading rules for MediaReports' and CommentReports' content |foreign keys. This makes it possible for the Reports to continue to exist |after the content is deleted. --\ mediagoblin/moderation/tools.py --| Fixed formatting of Report Resolution Methods --| Took out pieces of code used in debugging --\ mediagoblin/templates/mediagoblin/base.html --\ mediagoblin/templates/mediagoblin/moderation/report.html --| Made reports details page able to tell what is a deleted archived report. --\ mediagoblin/templates/mediagoblin/moderation/report_panel.html --\ mediagoblin/templates/mediagoblin/utils/report.html
| * | | | | | This was a quick update, I mostly worked on the transition from using the oldtilly-Q2013-09-081-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | User table columns (is_admin, status, email_verified) and making sure that their functionality is instead completely handled by privileges. I also worked on the meta pages which I hope to finish soon. I set up migrations to ensure the default privileges are given to users that should have them. Lastly, I made it so that banned users can log out. =============================================================================== Made Sure the Vestigial Columns of the User Table were not being Used =============================================================================== --\ mediagoblin/auth/views.py --\ mediagoblin/db/models.py --\ mediagoblin/templates/mediagoblin/base.html --\ mediagoblin/templates/mediagoblin/moderation/user.html --\ mediagoblin/templates/mediagoblin/user_pages/collection_lis$ --\ mediagoblin/templates/mediagoblin/user_pages/user.html --\ mediagoblin/tests/test_auth.py --\ mediagoblin/tests/test_persona.py --\ mediagoblin/user_pages/views.py =============================================================================== Wrote the Migrations to Set up the Default Privileges =============================================================================== --\ mediagoblin/db/migrations.py --\ mediagoblin/gmg_commands/users.py =============================================================================== Work on the Meta Pages =============================================================================== --\ mediagoblin/meta/routing.py --\ mediagoblin/meta/views.py --\ mediagoblin/static/css/base.css --\ mediagoblin/templates/mediagoblin/meta/terms_of_service.html =============================================================================== Small Changes =============================================================================== --\ mediagoblin/templates/mediagoblin/base.html --| Benevolently made it so that banned users can log out =============================================================================== X X X X X X X X X X X X X X X X X X X X ===============================================================================
| * | | | | | I did some more code-keeping in this commit. I added a lot of documentation, sotilly-Q2013-09-033-23/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ===============================================================================