This commit is contained in:
r888888888
2015-10-15 15:24:24 -07:00
parent 8a09151c14
commit 6480864718
30 changed files with 70 additions and 93 deletions

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env ruby
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'config', 'environment'))
ActiveRecord::Base.connection.execute("set statement_timeout = 0")
CurrentUser.user = User.admins.first
CurrentUser.ip_addr = "127.0.0.1"
User.where("level >= ?", User::Levels::CONTRIBUTOR).find_each do |user|
user.can_upload_free = true
user.level = User::Levels::BUILDER if user.level == User::Levels::CONTRIBUTOR
user.save
end