-
-
Notifications
You must be signed in to change notification settings - Fork 28
Rake
Different backend tasks affecting users or the database, besides admin/deadmin
every task can be done on the webinterface itself if you visit an users profile.
Adding/Removing Admin Status:
$ bundle exec rake 'justask:admin[your_username]' RAILS_ENV=production
$ bundle exec rake 'justask:deadmin[get_rekt]' RAILS_ENV=production
Adding/Removing Moderator Status:
$ bundle exec rake 'justask:mod[someone_else]' RAILS_ENV=production
$ bundle exec rake 'justask:demod[someone_else]' RAILS_ENV=production
Adding/Removing Supporter Status:
$ bundle exec rake 'justask:sup[someone_else]' RAILS_ENV=production
$ bundle exec rake 'justask:desup[someone_else]' RAILS_ENV=production
Adding/Removing Blogger Status:
$ bundle exec rake 'justask:blog[someone_else]' RAILS_ENV=production
$ bundle exec rake 'justask:unblog[someone_else]' RAILS_ENV=production
Adding/Removing Contributor Status:
$ bundle exec rake 'justask:contrib[someone_else]' RAILS_ENV=production
$ bundle exec rake 'justask:decontrib[someone_else]' RAILS_ENV=production
Permanently ban a user:
$ bundle exec rake 'justask:permanently_ban[username, reason]' RAILS_ENV=production
Ban a user for one day:
$ bundle exec rake 'justask:ban[username, reason]' RAILS_ENV=production
Ban a user for one week:
$ bundle exec rake 'justask:week_ban[username, reason]' RAILS_ENV=production
Ban a user for one month:
$ bundle exec rake 'justask:month_ban[username, reason]' RAILS_ENV=production
Ban a user for one year:
$ bundle exec rake 'justask:year_ban[username, reason]' RAILS_ENV=production
Ban a user for one aeon (a billion years):
$ bundle exec rake 'justask:aeon_ban[username, reason]' RAILS_ENV=production
Unban a user:
$ bundle exec rake 'justask:unban[username]' RAILS_ENV=production
Export user data:
$ bundle exec rake 'justask:export[jdoe@example.tld]' RAILS_ENV=production
List all users:
$ bundle exec rake justask:lusers
Find the user(s) with the most self-asked anonymous questions:
$ bundle exec rake justask:loners
Recount values shown on the site (helpful if they have been messed with manually):
$ bundle exec rake justask:recount
Notifications
They usually broke when people deleted themselves after leaving notifications, so the pages became unaccessible.
$ bundle exec rake justask:fix_notifications
Subscriptions (not needed anymore)
After adding notification subscriptions, users didn't get any notifications for new comments, since they weren't subscribed to them before. Shouldn't occur anymore, if you set up after the subscriptions were added.
$ bundle exec rake justask:fix_submarines
Reports
If a reported user/user who reported deletes himself, the moderation panel is breaking, this task will remove reports from/including these people.
$ bundle exec rake justask:fix_reports
Database
This should fix anything database-related that comes up.
$ bundle exec rake justask:fix_db
Upload existing images to the configured AWS bucket:
$ bundle exec rake justask:paperclaws