diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2009-12-23 06:27:28 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2009-12-23 06:27:28 +0000 |
commit | aa9951b38b27c7465a313fc72b73b819b292e9b2 (patch) | |
tree | ff112e75cb81a66d7ae0568003f6bb81dc303e35 /db | |
parent | 9f59cd64ab9fd10668cad6bbeae3c4daadb0325a (diff) | |
download | redmine-aa9951b38b27c7465a313fc72b73b819b292e9b2.tar.gz redmine-aa9951b38b27c7465a313fc72b73b819b292e9b2.zip |
Added an API token for each User to use when making API requests. (#3920)
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
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20091221004949_add_api_keys_for_users.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/db/migrate/20091221004949_add_api_keys_for_users.rb b/db/migrate/20091221004949_add_api_keys_for_users.rb new file mode 100644 index 000000000..36fc7e1b3 --- /dev/null +++ b/db/migrate/20091221004949_add_api_keys_for_users.rb @@ -0,0 +1,13 @@ +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 |