aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands
Commit message (Collapse)AuthorAgeFilesLines
...
| * add bulk_run, thumbs, and initial sub_commandsRodney Ewing2013-08-161-19/+77
| |
| * Fixing ./bin/gmg reprocess available, which I broke :)Christopher Allan Webber2013-08-161-2/+3
| |
| * Trying to fix the bug that's happening to rodney757 but not to me ;)Christopher Allan Webber2013-08-161-4/+5
| |
| * Revert "use parser.parse_known_args() instead of parser.parse_args()"Christopher Allan Webber2013-08-166-45/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 029e779c468ba1a6bfd893679cfaae7f418f45dd. (and a bit more!) This wasn't needed anymore because we did a "rest" capture and passed that over to the reprocess run command. Conflicts: mediagoblin/gmg_commands/assetlink.py mediagoblin/gmg_commands/dbupdate.py mediagoblin/gmg_commands/import_export.py mediagoblin/gmg_commands/users.py
| * Renaming the processing manager stuff to be less ambiguous.Christopher Allan Webber2013-08-161-4/+4
| | | | | | | | | | | | BONUS COMMIT to Ben Finney and the Free Software Melbourne crew. :) IRONY: Initially I committed this as "media manager".
| * That manager.process() line no longer made senseChristopher Allan Webber2013-08-161-1/+0
| |
| * Updating to the point where we can allllmost run with the new reprocessing codeChristopher Allan Webber2013-08-161-25/+13
| | | | | | | | This commit sponsored by Odin Hørthe Omdal. Thank you!
| * Should be enough to get to the point where you can actually initialize a ↵Christopher Allan Webber2013-08-161-4/+5
| | | | | | | | | | | | | | | | processing command now. However, it doesn't celery task-ify it... This commit sponsored by Catalin Cosovanu. Thank you!
| * Steps toward working "run" reprocessing command.Christopher Allan Webber2013-08-161-9/+32
| | | | | | | | This commit sponsored by Philippe Casteleyn. Thank you!
| * Moving celery setup to the right placeChristopher Allan Webber2013-08-161-4/+4
| | | | | | | | This commit sponsored by Jose Manuel Zueco Lazaro. Thank you!
| * Whitespacin' it up.Christopher Allan Webber2013-08-161-0/+3
| |
| * `gmg reprocess available --action-help` now tells you processor arguments!Christopher Allan Webber2013-08-161-6/+20
| | | | | | | | | | Every reprocessing action possible can inform you of its command line argument stuff! Is that awesome or what?
| * "initial" reprocessing subcommand now works!Christopher Allan Webber2013-08-161-4/+27
| | | | | | | | | | | | | | We are on our way now to a working reprocessing system under this redesign! This commit sponsored by Bjarni Rúnar Einarsson. Thank you!
| * More progress towards the new reprocessing infrastructure: args updatingChristopher Allan Webber2013-08-162-21/+73
| | | | | | | | This commit sponsored by Elizabeth Webber. Thanks, sis!
| * added comments and did a little refactoring. not sure if it is actually any ↵Rodney Ewing2013-08-161-11/+34
| | | | | | | | clearer though
| * add option to not run eagerlyRodney Ewing2013-08-161-2/+8
| |
| * added image reprocessingRodney Ewing2013-08-161-0/+3
| |
| * pep 8Rodney Ewing2013-08-161-9/+9
| |
| * add command option for regenerating all thumbnailsRodney Ewing2013-08-161-3/+18
| |
| * make media_id an optional argumentRodney Ewing2013-08-161-40/+42
| |
| * refactored _run_reprocessingRodney Ewing2013-08-161-1/+9
| |
| * added a set_media_state function. removed the --all flag (just don't enter ↵Rodney Ewing2013-08-161-15/+27
| | | | | | | | any media_ids to process all media). slight refactor
| * Pep 8Rodney Ewing2013-08-161-4/+4
| |
| * Just raise standard exception. Pass print statement to gettextRodney Ewing2013-08-161-19/+10
| |
| * added a _run_reprocessing function which handles the hook callsRodney Ewing2013-08-161-0/+6
| |
| * add reprocess_all function. still need to add code to reprocess all failed ↵Rodney Ewing2013-08-161-0/+28
| | | | | | | | entries
| * Added a set_media_type function that has checks to only reprocess one ↵Rodney Ewing2013-08-161-1/+47
| | | | | | | | media_type at a time
| * Beginnings of a reprocess commandRodney Ewing2013-08-162-0/+45
| |
| * Throw an error if there are unrecognized argumentsRodney Ewing2013-08-166-1/+18
| |
| * use parser.parse_known_args() instead of parser.parse_args()Rodney Ewing2013-08-166-36/+36
| |
* | This was a quick update, I mostly worked on the transition from using the oldtilly-Q2013-09-081-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ===============================================================================
* | This was a big commit! I included lots of documentation below, but generally Itilly-Q2013-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. =============================================================================== ===============================================================================
* | Merge branch 'master' into OPW-Moderation-Updatetilly-Q2013-08-201-2/+2
|\| | | | | | | | | | | | | | | Conflicts: mediagoblin/db/models.py mediagoblin/decorators.py mediagoblin/routing.py mediagoblin/user_pages/views.py
| * typo fix in foundations branchRodney Ewing2013-08-021-2/+2
| |
* | This has been an update to clean out the code a little bit. The primary changetilly-Q2013-08-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | This commit was the work I did fixing errors that cropped up from the merge.tilly-Q2013-07-311-8/+12
| | | | | | | | | | There were a few errors because of the switch from sqlalchemy 0.7 to 0.8 but I cleared them up.
* | Merge branch 'ticket-679' into OPW-Moderation-Updatetilly-Q2013-07-293-27/+48
|\| | | | | | | | | | | | | | | | | | | | | 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
| * I actually had to do a bit more work than I thought, because I needed to accounttilly-Q2013-07-291-5/+20
| | | | | | | | | | | | 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.
| * Merge branch 'rodney757-media_plugins'Christopher Allan Webber2013-07-121-9/+1
| |\ | | | | | | | | | | | | | | | Conflicts: mediagoblin.ini mediagoblin/tests/test_mgoblin_app.ini
| | * modified gmg to use plugin media_types and converted image media_type to new ↵Rodney Ewing2013-07-021-9/+1
| | | | | | | | | | | | plugin style
| * | Patch by Strum. Ticket #451 - Convert all mongokit style .find, .find_one, ↵Rodney Ewing2013-07-112-7/+9
| | | | | | | | | | | | .one calls over to SQLAlchemy queries
| * | Merge remote-tracking branch 'remotes/lotusecho/trac_711_test_speed'Christopher Allan Webber2013-07-031-3/+15
| |\ \ | | |/ | |/|
| | * Updated comments for run_all_migrations and config_spec.ini.Emily O'Leary2013-06-271-2/+6
| | |
| | * Improved test runtime from 352 seconds to 59 seconds by implementing an ↵Emily O'Leary2013-06-251-3/+11
| | | | | | | | | | | | in-memory sqlite DB and including an option to run migrations on this newly created database by adding a config option called run_migrations to the config_spec and passing it along in app.py to the setup_database function.
| * | moved bcrypt_gen_password_hash to basic_auth/tools and added ↵Rodney Ewing2013-05-241-3/+3
| |/ | | | | | | gen_password_hash function to auth/__init__
* | Whew. This is a big update. I did some significant keeping work. I moved all oftilly-Q2013-07-171-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | This was a simple commit. I changed all references to Groups into Privileges sotilly-Q2013-07-031-0/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as to not conflict with the new federated groups which are also being written. I also fixed up some of the code in the user_in_group/user_has_privilege decor- ator. Users are now assigned the default privileges when they sign up, and ass- iged active once they are activated. I updated the gmg command makeadmin to use my groups as well. Lastly, I added the decorator to various views, requiring th- at users belong to appropriate groups to access pages. --\ mediagoblin/auth/tools.py --| Added code to assign new users to default privileges --\ mediagoblin/auth/views.py --| Added code to assign users to u'active' privilege once the email | verification is complete --\ mediagoblin/db/migrations.py --| Renamed Group class to Privilege class --\ mediagoblin/db/models.py --| Renamed Group class to Privilege class --\ mediagoblin/decorators.py --| Renamed function based on the Group->Privilege change --| Rewrote the function to be, ya know, functional --\ mediagoblin/gmg_commands/users.py --| Changed the 'makeadmin' command to add the target user to the admin | privilege group as well as affecting 'is_admin' column --\ mediagoblin/submit/views.py --| Added the requirement that a user has the 'uploader' privilege in order | to submit new media. --\ mediagoblin/user_pages/views.py --| Added the requirement that a user has the 'commenter' privilege in order | to make a comment. --| Added the requirement that a user has the 'reporter' privilege in order | to submit new reports. --| Got rid of some vestigial code in the file_a_report function.
* Cleaning a bit: os.path.sep.join -> os.path.joinChristopher Allan Webber2013-05-231-2/+2
|
* docstring update: link theme... and plugins!Christopher Allan Webber2013-05-231-1/+1
|
* Generalize "gmg theme assetlink" -> "gmg assetlink" and cover both theme and ↵Christopher Allan Webber2013-05-232-52/+29
| | | | | | | | | plugins We've moved the module... probably I'll re-add theme just to give a warning that this is deprecated. This commit sponsored by Kevin Williams. Thank you!