The API key will be displayed on My Account page with a link to reset or generate a new one. All existing users will have a token generated by the migration. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3217 e93f8b46-1217-0410-a6f0-8f06a7374b81
14 lines
271 B
Ruby
14 lines
271 B
Ruby
class AddApiKeysForUsers < ActiveRecord::Migration
|
|
def self.up
|
|
say_with_time("Generating API keys for active users") do
|
|
User.active.all(:include => :api_token).each do |user|
|
|
user.api_key
|
|
end
|
|
end
|
|
end
|
|
|
|
def self.down
|
|
# No-op
|
|
end
|
|
end
|