devise_token_auth 0.1.42 → 0.1.43.beta1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of devise_token_auth might be problematic. Click here for more details.

Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +39 -38
  3. data/app/controllers/devise_token_auth/application_controller.rb +15 -0
  4. data/app/controllers/devise_token_auth/concerns/resource_finder.rb +38 -0
  5. data/app/controllers/devise_token_auth/concerns/set_user_by_token.rb +21 -19
  6. data/app/controllers/devise_token_auth/confirmations_controller.rb +12 -7
  7. data/app/controllers/devise_token_auth/omniauth_callbacks_controller.rb +3 -7
  8. data/app/controllers/devise_token_auth/passwords_controller.rb +16 -26
  9. data/app/controllers/devise_token_auth/registrations_controller.rb +6 -2
  10. data/app/controllers/devise_token_auth/sessions_controller.rb +3 -14
  11. data/app/controllers/devise_token_auth/unlocks_controller.rb +105 -0
  12. data/app/models/devise_token_auth/concerns/user.rb +29 -12
  13. data/app/models/devise_token_auth/concerns/user_omniauth_callbacks.rb +5 -8
  14. data/app/views/devise/mailer/unlock_instructions.html.erb +1 -1
  15. data/app/views/devise_token_auth/omniauth_external_window.html.erb +1 -1
  16. data/config/initializers/devise.rb +1 -1
  17. data/config/locales/da-DK.yml +50 -0
  18. data/config/locales/en.yml +4 -0
  19. data/lib/devise_token_auth/controllers/helpers.rb +30 -20
  20. data/lib/devise_token_auth/rails/routes.rb +1 -1
  21. data/lib/devise_token_auth/url.rb +1 -1
  22. data/lib/devise_token_auth/version.rb +1 -1
  23. data/lib/generators/devise_token_auth/templates/devise_token_auth_create_users.rb.erb +2 -1
  24. data/lib/generators/devise_token_auth/templates/user.rb +1 -1
  25. data/test/controllers/custom/custom_confirmations_controller_test.rb +5 -10
  26. data/test/controllers/custom/custom_omniauth_callbacks_controller_test.rb +15 -16
  27. data/test/controllers/custom/custom_passwords_controller_test.rb +28 -34
  28. data/test/controllers/custom/custom_registrations_controller_test.rb +23 -21
  29. data/test/controllers/custom/custom_sessions_controller_test.rb +16 -18
  30. data/test/controllers/custom/custom_token_validations_controller_test.rb +13 -11
  31. data/test/controllers/demo_group_controller_test.rb +19 -5
  32. data/test/controllers/demo_mang_controller_test.rb +37 -16
  33. data/test/controllers/demo_user_controller_test.rb +70 -38
  34. data/test/controllers/devise_token_auth/confirmations_controller_test.rb +40 -22
  35. data/test/controllers/devise_token_auth/omniauth_callbacks_controller_test.rb +108 -82
  36. data/test/controllers/devise_token_auth/passwords_controller_test.rb +127 -145
  37. data/test/controllers/devise_token_auth/registrations_controller_test.rb +258 -274
  38. data/test/controllers/devise_token_auth/sessions_controller_test.rb +112 -117
  39. data/test/controllers/devise_token_auth/token_validations_controller_test.rb +14 -15
  40. data/test/controllers/devise_token_auth/unlocks_controller_test.rb +194 -0
  41. data/test/controllers/overrides/confirmations_controller_test.rb +8 -9
  42. data/test/controllers/overrides/omniauth_callbacks_controller_test.rb +16 -12
  43. data/test/controllers/overrides/passwords_controller_test.rb +19 -15
  44. data/test/controllers/overrides/registrations_controller_test.rb +7 -7
  45. data/test/controllers/overrides/sessions_controller_test.rb +6 -6
  46. data/test/controllers/overrides/token_validations_controller_test.rb +7 -4
  47. data/test/dummy/app/controllers/auth_origin_controller.rb +2 -2
  48. data/test/dummy/app/controllers/custom/omniauth_callbacks_controller.rb +0 -2
  49. data/test/dummy/app/controllers/overrides/confirmations_controller.rb +11 -7
  50. data/test/dummy/app/controllers/overrides/passwords_controller.rb +10 -8
  51. data/test/dummy/app/controllers/overrides/sessions_controller.rb +1 -1
  52. data/test/dummy/db/migrate/20140715061447_devise_token_auth_create_users.rb +2 -2
  53. data/test/dummy/db/migrate/20140715061805_devise_token_auth_create_mangs.rb +2 -2
  54. data/test/dummy/db/migrate/20140829044006_add_operating_thetan_to_user.rb +1 -1
  55. data/test/dummy/db/migrate/20140916224624_add_favorite_color_to_mangs.rb +1 -1
  56. data/test/dummy/db/migrate/20140928231203_devise_token_auth_create_evil_users.rb +2 -1
  57. data/test/dummy/db/migrate/20141222035835_devise_token_auth_create_only_email_users.rb +1 -1
  58. data/test/dummy/db/migrate/20141222053502_devise_token_auth_create_unregisterable_users.rb +2 -1
  59. data/test/dummy/db/migrate/20150409095712_devise_token_auth_create_nice_users.rb +2 -1
  60. data/test/dummy/db/migrate/20150708104536_devise_token_auth_create_unconfirmable_users.rb +2 -1
  61. data/test/dummy/db/migrate/20160103235141_devise_token_auth_create_scoped_users.rb +2 -1
  62. data/test/dummy/db/migrate/20160629184441_devise_token_auth_create_lockable_users.rb +2 -1
  63. data/test/dummy/db/schema.rb +157 -162
  64. data/test/dummy/tmp/generators/app/models/user.rb +1 -1
  65. data/test/dummy/tmp/generators/db/migrate/{20170517171822_devise_token_auth_create_users.rb → 20171014052631_devise_token_auth_create_users.rb} +2 -1
  66. data/test/lib/generators/devise_token_auth/install_generator_test.rb +5 -1
  67. data/test/models/user_test.rb +35 -1
  68. data/test/test_helper.rb +17 -11
  69. metadata +85 -80
@@ -13,21 +13,21 @@ class Overrides::RegistrationsControllerTest < ActionDispatch::IntegrationTest
13
13
  @existing_user.skip_confirmation!
14
14
  @existing_user.save!
15
15
 
16
- post '/evil_user_auth/sign_in', {
17
- email: @existing_user.email,
18
- password: 'secret123'
19
- }
16
+ post '/evil_user_auth/sign_in',
17
+ params: { email: @existing_user.email,
18
+ password: 'secret123' }
20
19
 
21
20
  @resource = assigns(:resource)
22
21
  @data = JSON.parse(response.body)
23
22
  end
24
23
 
25
- test "request should succeed" do
24
+ test 'request should succeed' do
26
25
  assert_equal 200, response.status
27
26
  end
28
27
 
29
28
  test 'controller was overridden' do
30
- assert_equal Overrides::RegistrationsController::OVERRIDE_PROOF, @data['override_proof']
29
+ assert_equal Overrides::RegistrationsController::OVERRIDE_PROOF,
30
+ @data['override_proof']
31
31
  end
32
32
  end
33
33
  end
@@ -22,17 +22,20 @@ class Overrides::TokenValidationsControllerTest < ActionDispatch::IntegrationTes
22
22
  # ensure that request is not treated as batch request
23
23
  age_token(@resource, @client_id)
24
24
 
25
- get '/evil_user_auth/validate_token', {}, @auth_headers
25
+ get '/evil_user_auth/validate_token',
26
+ params: {},
27
+ headers: @auth_headers
26
28
 
27
29
  @resp = JSON.parse(response.body)
28
30
  end
29
31
 
30
- test "token valid" do
32
+ test 'token valid' do
31
33
  assert_equal 200, response.status
32
34
  end
33
35
 
34
- test "controller was overridden" do
35
- assert_equal Overrides::TokenValidationsController::OVERRIDE_PROOF, @resp["override_proof"]
36
+ test 'controller was overridden' do
37
+ assert_equal Overrides::TokenValidationsController::OVERRIDE_PROOF,
38
+ @resp['override_proof']
36
39
  end
37
40
  end
38
41
  end
@@ -1,5 +1,5 @@
1
1
  class AuthOriginController < ApplicationController
2
2
  def redirected
3
- render :nothing => true
3
+ head :ok
4
4
  end
5
- end
5
+ end
@@ -1,5 +1,4 @@
1
1
  class Custom::OmniauthCallbacksController < DeviseTokenAuth::OmniauthCallbacksController
2
-
3
2
  def omniauth_success
4
3
  super do |resource|
5
4
  @omniauth_success_block_called = true unless resource.nil?
@@ -9,5 +8,4 @@ class Custom::OmniauthCallbacksController < DeviseTokenAuth::OmniauthCallbacksCo
9
8
  def omniauth_success_block_called?
10
9
  @omniauth_success_block_called == true
11
10
  end
12
-
13
11
  end
@@ -8,7 +8,7 @@ module Overrides
8
8
  client_id = SecureRandom.urlsafe_base64(nil, false)
9
9
  token = SecureRandom.urlsafe_base64(nil, false)
10
10
  token_hash = BCrypt::Password.create(token)
11
- expiry = (Time.now + DeviseTokenAuth.token_lifespan).to_i
11
+ expiry = (Time.now + @resource.token_lifespan).to_i
12
12
 
13
13
  @resource.tokens[client_id] = {
14
14
  token: token_hash,
@@ -17,13 +17,17 @@ module Overrides
17
17
 
18
18
  @resource.save!
19
19
 
20
- redirect_to(@resource.build_auth_url(params[:redirect_url], {
21
- token: token,
22
- client_id: client_id,
20
+ redirect_header_options = {
23
21
  account_confirmation_success: true,
24
- config: params[:config],
25
- override_proof: "(^^,)"
26
- }))
22
+ config: params[:config],
23
+ override_proof: "(^^,)"
24
+ }
25
+ redirect_headers = build_redirect_headers(token,
26
+ client_id,
27
+ redirect_header_options)
28
+
29
+ redirect_to(@resource.build_auth_url(params[:redirect_url],
30
+ redirect_headers))
27
31
  else
28
32
  raise ActionController::RoutingError.new('Not Found')
29
33
  end
@@ -12,7 +12,7 @@ module Overrides
12
12
  client_id = SecureRandom.urlsafe_base64(nil, false)
13
13
  token = SecureRandom.urlsafe_base64(nil, false)
14
14
  token_hash = BCrypt::Password.create(token)
15
- expiry = (Time.now + DeviseTokenAuth.token_lifespan).to_i
15
+ expiry = (Time.now + @resource.token_lifespan).to_i
16
16
 
17
17
  @resource.tokens[client_id] = {
18
18
  token: token_hash,
@@ -24,13 +24,15 @@ module Overrides
24
24
 
25
25
  @resource.save!
26
26
 
27
- redirect_to(@resource.build_auth_url(params[:redirect_url], {
28
- token: token,
29
- client_id: client_id,
30
- reset_password: true,
31
- config: params[:config],
32
- override_proof: OVERRIDE_PROOF
33
- }))
27
+ redirect_header_options = {
28
+ override_proof: OVERRIDE_PROOF,
29
+ reset_password: true
30
+ }
31
+ redirect_headers = build_redirect_headers(token,
32
+ client_id,
33
+ redirect_header_options)
34
+ redirect_to(@resource.build_auth_url(params[:redirect_url],
35
+ redirect_headers))
34
36
  else
35
37
  raise ActionController::RoutingError.new('Not Found')
36
38
  end
@@ -12,7 +12,7 @@ module Overrides
12
12
 
13
13
  @resource.tokens[@client_id] = {
14
14
  token: BCrypt::Password.create(@token),
15
- expiry: (Time.now + DeviseTokenAuth.token_lifespan).to_i
15
+ expiry: (Time.now + @resource.token_lifespan).to_i
16
16
  }
17
17
  @resource.save
18
18
 
@@ -1,6 +1,6 @@
1
1
  include MigrationDatabaseHelper
2
2
 
3
- class DeviseTokenAuthCreateUsers < ActiveRecord::Migration
3
+ class DeviseTokenAuthCreateUsers < ActiveRecord::Migration[4.2]
4
4
  def change
5
5
  create_table(:users) do |t|
6
6
  ## Database authenticatable
@@ -11,6 +11,7 @@ class DeviseTokenAuthCreateUsers < ActiveRecord::Migration
11
11
  t.string :reset_password_token
12
12
  t.datetime :reset_password_sent_at
13
13
  t.string :reset_password_redirect_url
14
+ t.boolean :allow_password_change, :default => false
14
15
 
15
16
  ## Rememberable
16
17
  t.datetime :remember_created_at
@@ -26,7 +27,6 @@ class DeviseTokenAuthCreateUsers < ActiveRecord::Migration
26
27
  t.string :confirmation_token
27
28
  t.datetime :confirmed_at
28
29
  t.datetime :confirmation_sent_at
29
- t.string :confirm_success_url
30
30
  t.string :unconfirmed_email # Only if using reconfirmable
31
31
 
32
32
  ## Lockable
@@ -1,6 +1,6 @@
1
1
  include MigrationDatabaseHelper
2
2
 
3
- class DeviseTokenAuthCreateMangs < ActiveRecord::Migration
3
+ class DeviseTokenAuthCreateMangs < ActiveRecord::Migration[4.2]
4
4
  def change
5
5
  create_table(:mangs) do |t|
6
6
  ## Database authenticatable
@@ -11,6 +11,7 @@ class DeviseTokenAuthCreateMangs < ActiveRecord::Migration
11
11
  t.string :reset_password_token
12
12
  t.datetime :reset_password_sent_at
13
13
  t.string :reset_password_redirect_url
14
+ t.boolean :allow_password_change, :default => false
14
15
 
15
16
  ## Rememberable
16
17
  t.datetime :remember_created_at
@@ -26,7 +27,6 @@ class DeviseTokenAuthCreateMangs < ActiveRecord::Migration
26
27
  t.string :confirmation_token
27
28
  t.datetime :confirmed_at
28
29
  t.datetime :confirmation_sent_at
29
- t.string :confirm_success_url
30
30
  t.string :unconfirmed_email # Only if using reconfirmable
31
31
 
32
32
  ## Lockable
@@ -1,4 +1,4 @@
1
- class AddOperatingThetanToUser < ActiveRecord::Migration
1
+ class AddOperatingThetanToUser < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :users, :operating_thetan, :integer
4
4
  add_column :users, :favorite_color, :string
@@ -1,4 +1,4 @@
1
- class AddFavoriteColorToMangs < ActiveRecord::Migration
1
+ class AddFavoriteColorToMangs < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :mangs, :favorite_color, :string
4
4
  end
@@ -1,6 +1,6 @@
1
1
  include MigrationDatabaseHelper
2
2
 
3
- class DeviseTokenAuthCreateEvilUsers < ActiveRecord::Migration
3
+ class DeviseTokenAuthCreateEvilUsers < ActiveRecord::Migration[4.2]
4
4
  def change
5
5
  create_table(:evil_users) do |t|
6
6
  ## Database authenticatable
@@ -10,6 +10,7 @@ class DeviseTokenAuthCreateEvilUsers < ActiveRecord::Migration
10
10
  ## Recoverable
11
11
  t.string :reset_password_token
12
12
  t.datetime :reset_password_sent_at
13
+ t.boolean :allow_password_change, :default => false
13
14
 
14
15
  ## Rememberable
15
16
  t.datetime :remember_created_at
@@ -1,6 +1,6 @@
1
1
  include MigrationDatabaseHelper
2
2
 
3
- class DeviseTokenAuthCreateOnlyEmailUsers < ActiveRecord::Migration
3
+ class DeviseTokenAuthCreateOnlyEmailUsers < ActiveRecord::Migration[4.2]
4
4
  def change
5
5
  create_table(:only_email_users) do |t|
6
6
  ## Required
@@ -1,6 +1,6 @@
1
1
  include MigrationDatabaseHelper
2
2
 
3
- class DeviseTokenAuthCreateUnregisterableUsers < ActiveRecord::Migration
3
+ class DeviseTokenAuthCreateUnregisterableUsers < ActiveRecord::Migration[4.2]
4
4
  def change
5
5
  create_table(:unregisterable_users) do |t|
6
6
  ## Required
@@ -13,6 +13,7 @@ class DeviseTokenAuthCreateUnregisterableUsers < ActiveRecord::Migration
13
13
  ## Recoverable
14
14
  t.string :reset_password_token
15
15
  t.datetime :reset_password_sent_at
16
+ t.boolean :allow_password_change, :default => false
16
17
 
17
18
  ## Rememberable
18
19
  t.datetime :remember_created_at
@@ -1,6 +1,6 @@
1
1
  include MigrationDatabaseHelper
2
2
 
3
- class DeviseTokenAuthCreateNiceUsers < ActiveRecord::Migration
3
+ class DeviseTokenAuthCreateNiceUsers < ActiveRecord::Migration[4.2]
4
4
  def change
5
5
  create_table(:nice_users) do |t|
6
6
  ## Required
@@ -13,6 +13,7 @@ class DeviseTokenAuthCreateNiceUsers < ActiveRecord::Migration
13
13
  ## Recoverable
14
14
  t.string :reset_password_token
15
15
  t.datetime :reset_password_sent_at
16
+ t.boolean :allow_password_change, :default => false
16
17
 
17
18
  ## Rememberable
18
19
  t.datetime :remember_created_at
@@ -1,6 +1,6 @@
1
1
  include MigrationDatabaseHelper
2
2
 
3
- class DeviseTokenAuthCreateUnconfirmableUsers < ActiveRecord::Migration
3
+ class DeviseTokenAuthCreateUnconfirmableUsers < ActiveRecord::Migration[4.2]
4
4
  def change
5
5
  create_table(:unconfirmable_users) do |t|
6
6
  ## Required
@@ -13,6 +13,7 @@ class DeviseTokenAuthCreateUnconfirmableUsers < ActiveRecord::Migration
13
13
  ## Recoverable
14
14
  t.string :reset_password_token
15
15
  t.datetime :reset_password_sent_at
16
+ t.boolean :allow_password_change, :default => false
16
17
 
17
18
  ## Rememberable
18
19
  t.datetime :remember_created_at
@@ -1,6 +1,6 @@
1
1
  include MigrationDatabaseHelper
2
2
 
3
- class DeviseTokenAuthCreateScopedUsers < ActiveRecord::Migration
3
+ class DeviseTokenAuthCreateScopedUsers < ActiveRecord::Migration[4.2]
4
4
  def change
5
5
  create_table(:scoped_users) do |t|
6
6
  ## Required
@@ -13,6 +13,7 @@ class DeviseTokenAuthCreateScopedUsers < ActiveRecord::Migration
13
13
  ## Recoverable
14
14
  t.string :reset_password_token
15
15
  t.datetime :reset_password_sent_at
16
+ t.boolean :allow_password_change, :default => false
16
17
 
17
18
  ## Rememberable
18
19
  t.datetime :remember_created_at
@@ -1,6 +1,6 @@
1
1
  include MigrationDatabaseHelper
2
2
 
3
- class DeviseTokenAuthCreateLockableUsers < ActiveRecord::Migration
3
+ class DeviseTokenAuthCreateLockableUsers < ActiveRecord::Migration[4.2]
4
4
  def change
5
5
  create_table(:lockable_users) do |t|
6
6
  ## Required
@@ -13,6 +13,7 @@ class DeviseTokenAuthCreateLockableUsers < ActiveRecord::Migration
13
13
  ## Recoverable
14
14
  # t.string :reset_password_token
15
15
  # t.datetime :reset_password_sent_at
16
+ # t.boolean :allow_password_change, :default => false
16
17
 
17
18
  ## Rememberable
18
19
  # t.datetime :remember_created_at
@@ -1,4 +1,3 @@
1
- # encoding: UTF-8
2
1
  # This file is auto-generated from the current state of the database. Instead
3
2
  # of editing this file, please use the migrations feature of Active Record to
4
3
  # incrementally modify your database, and then regenerate this schema definition.
@@ -14,250 +13,246 @@
14
13
  ActiveRecord::Schema.define(version: 20160629184441) do
15
14
 
16
15
  create_table "evil_users", force: :cascade do |t|
17
- t.string "email"
18
- t.string "encrypted_password", default: "", null: false
19
- t.string "reset_password_token"
16
+ t.string "email"
17
+ t.string "encrypted_password", default: "", null: false
18
+ t.string "reset_password_token"
20
19
  t.datetime "reset_password_sent_at"
20
+ t.boolean "allow_password_change", default: false
21
21
  t.datetime "remember_created_at"
22
- t.integer "sign_in_count", default: 0, null: false
22
+ t.integer "sign_in_count", default: 0, null: false
23
23
  t.datetime "current_sign_in_at"
24
24
  t.datetime "last_sign_in_at"
25
- t.string "current_sign_in_ip"
26
- t.string "last_sign_in_ip"
27
- t.string "confirmation_token"
25
+ t.string "current_sign_in_ip"
26
+ t.string "last_sign_in_ip"
27
+ t.string "confirmation_token"
28
28
  t.datetime "confirmed_at"
29
29
  t.datetime "confirmation_sent_at"
30
- t.string "unconfirmed_email"
31
- t.string "name"
32
- t.string "nickname"
33
- t.string "image"
34
- t.string "provider"
35
- t.string "uid", default: "", null: false
36
- t.text "tokens"
37
- t.string "favorite_color"
30
+ t.string "unconfirmed_email"
31
+ t.string "name"
32
+ t.string "nickname"
33
+ t.string "image"
34
+ t.string "provider"
35
+ t.string "uid", default: "", null: false
36
+ t.text "tokens"
37
+ t.string "favorite_color"
38
38
  t.datetime "created_at"
39
39
  t.datetime "updated_at"
40
+ t.index ["confirmation_token"], name: "index_evil_users_on_confirmation_token", unique: true
41
+ t.index ["email"], name: "index_evil_users_on_email"
42
+ t.index ["reset_password_token"], name: "index_evil_users_on_reset_password_token", unique: true
43
+ t.index ["uid", "provider"], name: "index_evil_users_on_uid_and_provider", unique: true
40
44
  end
41
45
 
42
- add_index "evil_users", ["confirmation_token"], name: "index_evil_users_on_confirmation_token", unique: true
43
- add_index "evil_users", ["email"], name: "index_evil_users_on_email"
44
- add_index "evil_users", ["reset_password_token"], name: "index_evil_users_on_reset_password_token", unique: true
45
- add_index "evil_users", ["uid", "provider"], name: "index_evil_users_on_uid_and_provider", unique: true
46
-
47
46
  create_table "lockable_users", force: :cascade do |t|
48
- t.string "provider", null: false
49
- t.string "uid", default: "", null: false
50
- t.string "encrypted_password", default: "", null: false
51
- t.integer "failed_attempts", default: 0, null: false
52
- t.string "unlock_token"
47
+ t.string "provider", null: false
48
+ t.string "uid", default: "", null: false
49
+ t.string "encrypted_password", default: "", null: false
50
+ t.integer "failed_attempts", default: 0, null: false
51
+ t.string "unlock_token"
53
52
  t.datetime "locked_at"
54
- t.string "name"
55
- t.string "nickname"
56
- t.string "image"
57
- t.string "email"
58
- t.text "tokens"
53
+ t.string "name"
54
+ t.string "nickname"
55
+ t.string "image"
56
+ t.string "email"
57
+ t.text "tokens"
59
58
  t.datetime "created_at"
60
59
  t.datetime "updated_at"
60
+ t.index ["email"], name: "index_lockable_users_on_email"
61
+ t.index ["uid", "provider"], name: "index_lockable_users_on_uid_and_provider", unique: true
62
+ t.index ["unlock_token"], name: "index_lockable_users_on_unlock_token", unique: true
61
63
  end
62
64
 
63
- add_index "lockable_users", ["email"], name: "index_lockable_users_on_email"
64
- add_index "lockable_users", ["uid", "provider"], name: "index_lockable_users_on_uid_and_provider", unique: true
65
- add_index "lockable_users", ["unlock_token"], name: "index_lockable_users_on_unlock_token", unique: true
66
-
67
65
  create_table "mangs", force: :cascade do |t|
68
- t.string "email"
69
- t.string "encrypted_password", default: "", null: false
70
- t.string "reset_password_token"
66
+ t.string "email"
67
+ t.string "encrypted_password", default: "", null: false
68
+ t.string "reset_password_token"
71
69
  t.datetime "reset_password_sent_at"
72
- t.string "reset_password_redirect_url"
70
+ t.string "reset_password_redirect_url"
71
+ t.boolean "allow_password_change", default: false
73
72
  t.datetime "remember_created_at"
74
- t.integer "sign_in_count", default: 0, null: false
73
+ t.integer "sign_in_count", default: 0, null: false
75
74
  t.datetime "current_sign_in_at"
76
75
  t.datetime "last_sign_in_at"
77
- t.string "current_sign_in_ip"
78
- t.string "last_sign_in_ip"
79
- t.string "confirmation_token"
76
+ t.string "current_sign_in_ip"
77
+ t.string "last_sign_in_ip"
78
+ t.string "confirmation_token"
80
79
  t.datetime "confirmed_at"
81
80
  t.datetime "confirmation_sent_at"
82
- t.string "confirm_success_url"
83
- t.string "unconfirmed_email"
84
- t.string "name"
85
- t.string "nickname"
86
- t.string "image"
87
- t.string "provider"
88
- t.string "uid", default: "", null: false
89
- t.text "tokens"
81
+ t.string "unconfirmed_email"
82
+ t.string "name"
83
+ t.string "nickname"
84
+ t.string "image"
85
+ t.string "provider"
86
+ t.string "uid", default: "", null: false
87
+ t.text "tokens"
90
88
  t.datetime "created_at"
91
89
  t.datetime "updated_at"
92
- t.string "favorite_color"
90
+ t.string "favorite_color"
91
+ t.index ["confirmation_token"], name: "index_mangs_on_confirmation_token", unique: true
92
+ t.index ["email"], name: "index_mangs_on_email"
93
+ t.index ["reset_password_token"], name: "index_mangs_on_reset_password_token", unique: true
94
+ t.index ["uid", "provider"], name: "index_mangs_on_uid_and_provider", unique: true
93
95
  end
94
96
 
95
- add_index "mangs", ["confirmation_token"], name: "index_mangs_on_confirmation_token", unique: true
96
- add_index "mangs", ["email"], name: "index_mangs_on_email"
97
- add_index "mangs", ["reset_password_token"], name: "index_mangs_on_reset_password_token", unique: true
98
- add_index "mangs", ["uid", "provider"], name: "index_mangs_on_uid_and_provider", unique: true
99
-
100
97
  create_table "nice_users", force: :cascade do |t|
101
- t.string "provider", null: false
102
- t.string "uid", default: "", null: false
103
- t.string "encrypted_password", default: "", null: false
104
- t.string "reset_password_token"
98
+ t.string "provider", null: false
99
+ t.string "uid", default: "", null: false
100
+ t.string "encrypted_password", default: "", null: false
101
+ t.string "reset_password_token"
105
102
  t.datetime "reset_password_sent_at"
103
+ t.boolean "allow_password_change", default: false
106
104
  t.datetime "remember_created_at"
107
- t.integer "sign_in_count", default: 0, null: false
105
+ t.integer "sign_in_count", default: 0, null: false
108
106
  t.datetime "current_sign_in_at"
109
107
  t.datetime "last_sign_in_at"
110
- t.string "current_sign_in_ip"
111
- t.string "last_sign_in_ip"
112
- t.string "confirmation_token"
108
+ t.string "current_sign_in_ip"
109
+ t.string "last_sign_in_ip"
110
+ t.string "confirmation_token"
113
111
  t.datetime "confirmed_at"
114
112
  t.datetime "confirmation_sent_at"
115
- t.string "unconfirmed_email"
116
- t.string "name"
117
- t.string "nickname"
118
- t.string "image"
119
- t.string "email"
120
- t.text "tokens"
113
+ t.string "unconfirmed_email"
114
+ t.string "name"
115
+ t.string "nickname"
116
+ t.string "image"
117
+ t.string "email"
118
+ t.text "tokens"
121
119
  t.datetime "created_at"
122
120
  t.datetime "updated_at"
121
+ t.index ["email"], name: "index_nice_users_on_email"
122
+ t.index ["reset_password_token"], name: "index_nice_users_on_reset_password_token", unique: true
123
+ t.index ["uid", "provider"], name: "index_nice_users_on_uid_and_provider", unique: true
123
124
  end
124
125
 
125
- add_index "nice_users", ["email"], name: "index_nice_users_on_email"
126
- add_index "nice_users", ["reset_password_token"], name: "index_nice_users_on_reset_password_token", unique: true
127
- add_index "nice_users", ["uid", "provider"], name: "index_nice_users_on_uid_and_provider", unique: true
128
-
129
126
  create_table "only_email_users", force: :cascade do |t|
130
- t.string "provider", null: false
131
- t.string "uid", default: "", null: false
132
- t.string "encrypted_password", default: "", null: false
133
- t.string "name"
134
- t.string "nickname"
135
- t.string "image"
136
- t.string "email"
137
- t.text "tokens"
127
+ t.string "provider", null: false
128
+ t.string "uid", default: "", null: false
129
+ t.string "encrypted_password", default: "", null: false
130
+ t.string "name"
131
+ t.string "nickname"
132
+ t.string "image"
133
+ t.string "email"
134
+ t.text "tokens"
138
135
  t.datetime "created_at"
139
136
  t.datetime "updated_at"
137
+ t.index ["email"], name: "index_only_email_users_on_email"
138
+ t.index ["uid", "provider"], name: "index_only_email_users_on_uid_and_provider", unique: true
140
139
  end
141
140
 
142
- add_index "only_email_users", ["email"], name: "index_only_email_users_on_email"
143
- add_index "only_email_users", ["uid", "provider"], name: "index_only_email_users_on_uid_and_provider", unique: true
144
-
145
141
  create_table "scoped_users", force: :cascade do |t|
146
- t.string "provider", null: false
147
- t.string "uid", default: "", null: false
148
- t.string "encrypted_password", default: "", null: false
149
- t.string "reset_password_token"
142
+ t.string "provider", null: false
143
+ t.string "uid", default: "", null: false
144
+ t.string "encrypted_password", default: "", null: false
145
+ t.string "reset_password_token"
150
146
  t.datetime "reset_password_sent_at"
147
+ t.boolean "allow_password_change", default: false
151
148
  t.datetime "remember_created_at"
152
- t.integer "sign_in_count", default: 0, null: false
149
+ t.integer "sign_in_count", default: 0, null: false
153
150
  t.datetime "current_sign_in_at"
154
151
  t.datetime "last_sign_in_at"
155
- t.string "current_sign_in_ip"
156
- t.string "last_sign_in_ip"
157
- t.string "confirmation_token"
152
+ t.string "current_sign_in_ip"
153
+ t.string "last_sign_in_ip"
154
+ t.string "confirmation_token"
158
155
  t.datetime "confirmed_at"
159
156
  t.datetime "confirmation_sent_at"
160
- t.string "unconfirmed_email"
161
- t.string "name"
162
- t.string "nickname"
163
- t.string "image"
164
- t.string "email"
165
- t.text "tokens"
157
+ t.string "unconfirmed_email"
158
+ t.string "name"
159
+ t.string "nickname"
160
+ t.string "image"
161
+ t.string "email"
162
+ t.text "tokens"
166
163
  t.datetime "created_at"
167
164
  t.datetime "updated_at"
165
+ t.index ["email"], name: "index_scoped_users_on_email"
166
+ t.index ["reset_password_token"], name: "index_scoped_users_on_reset_password_token", unique: true
167
+ t.index ["uid", "provider"], name: "index_scoped_users_on_uid_and_provider", unique: true
168
168
  end
169
169
 
170
- add_index "scoped_users", ["email"], name: "index_scoped_users_on_email"
171
- add_index "scoped_users", ["reset_password_token"], name: "index_scoped_users_on_reset_password_token", unique: true
172
- add_index "scoped_users", ["uid", "provider"], name: "index_scoped_users_on_uid_and_provider", unique: true
173
-
174
170
  create_table "unconfirmable_users", force: :cascade do |t|
175
- t.string "provider", null: false
176
- t.string "uid", default: "", null: false
177
- t.string "encrypted_password", default: "", null: false
178
- t.string "reset_password_token"
171
+ t.string "provider", null: false
172
+ t.string "uid", default: "", null: false
173
+ t.string "encrypted_password", default: "", null: false
174
+ t.string "reset_password_token"
179
175
  t.datetime "reset_password_sent_at"
176
+ t.boolean "allow_password_change", default: false
180
177
  t.datetime "remember_created_at"
181
- t.integer "sign_in_count", default: 0, null: false
178
+ t.integer "sign_in_count", default: 0, null: false
182
179
  t.datetime "current_sign_in_at"
183
180
  t.datetime "last_sign_in_at"
184
- t.string "current_sign_in_ip"
185
- t.string "last_sign_in_ip"
186
- t.string "name"
187
- t.string "nickname"
188
- t.string "image"
189
- t.string "email"
190
- t.text "tokens"
181
+ t.string "current_sign_in_ip"
182
+ t.string "last_sign_in_ip"
183
+ t.string "name"
184
+ t.string "nickname"
185
+ t.string "image"
186
+ t.string "email"
187
+ t.text "tokens"
191
188
  t.datetime "created_at"
192
189
  t.datetime "updated_at"
190
+ t.index ["email"], name: "index_unconfirmable_users_on_email"
191
+ t.index ["reset_password_token"], name: "index_unconfirmable_users_on_reset_password_token", unique: true
192
+ t.index ["uid", "provider"], name: "index_unconfirmable_users_on_uid_and_provider", unique: true
193
193
  end
194
194
 
195
- add_index "unconfirmable_users", ["email"], name: "index_unconfirmable_users_on_email"
196
- add_index "unconfirmable_users", ["reset_password_token"], name: "index_unconfirmable_users_on_reset_password_token", unique: true
197
- add_index "unconfirmable_users", ["uid", "provider"], name: "index_unconfirmable_users_on_uid_and_provider", unique: true
198
-
199
195
  create_table "unregisterable_users", force: :cascade do |t|
200
- t.string "provider", null: false
201
- t.string "uid", default: "", null: false
202
- t.string "encrypted_password", default: "", null: false
203
- t.string "reset_password_token"
196
+ t.string "provider", null: false
197
+ t.string "uid", default: "", null: false
198
+ t.string "encrypted_password", default: "", null: false
199
+ t.string "reset_password_token"
204
200
  t.datetime "reset_password_sent_at"
201
+ t.boolean "allow_password_change", default: false
205
202
  t.datetime "remember_created_at"
206
- t.integer "sign_in_count", default: 0, null: false
203
+ t.integer "sign_in_count", default: 0, null: false
207
204
  t.datetime "current_sign_in_at"
208
205
  t.datetime "last_sign_in_at"
209
- t.string "current_sign_in_ip"
210
- t.string "last_sign_in_ip"
211
- t.string "confirmation_token"
206
+ t.string "current_sign_in_ip"
207
+ t.string "last_sign_in_ip"
208
+ t.string "confirmation_token"
212
209
  t.datetime "confirmed_at"
213
210
  t.datetime "confirmation_sent_at"
214
- t.string "unconfirmed_email"
215
- t.string "name"
216
- t.string "nickname"
217
- t.string "image"
218
- t.string "email"
219
- t.text "tokens"
211
+ t.string "unconfirmed_email"
212
+ t.string "name"
213
+ t.string "nickname"
214
+ t.string "image"
215
+ t.string "email"
216
+ t.text "tokens"
220
217
  t.datetime "created_at"
221
218
  t.datetime "updated_at"
219
+ t.index ["email"], name: "index_unregisterable_users_on_email"
220
+ t.index ["reset_password_token"], name: "index_unregisterable_users_on_reset_password_token", unique: true
221
+ t.index ["uid", "provider"], name: "index_unregisterable_users_on_uid_and_provider", unique: true
222
222
  end
223
223
 
224
- add_index "unregisterable_users", ["email"], name: "index_unregisterable_users_on_email"
225
- add_index "unregisterable_users", ["reset_password_token"], name: "index_unregisterable_users_on_reset_password_token", unique: true
226
- add_index "unregisterable_users", ["uid", "provider"], name: "index_unregisterable_users_on_uid_and_provider", unique: true
227
-
228
224
  create_table "users", force: :cascade do |t|
229
- t.string "email"
230
- t.string "encrypted_password", default: "", null: false
231
- t.string "reset_password_token"
225
+ t.string "email"
226
+ t.string "encrypted_password", default: "", null: false
227
+ t.string "reset_password_token"
232
228
  t.datetime "reset_password_sent_at"
233
- t.string "reset_password_redirect_url"
229
+ t.string "reset_password_redirect_url"
230
+ t.boolean "allow_password_change", default: false
234
231
  t.datetime "remember_created_at"
235
- t.integer "sign_in_count", default: 0, null: false
232
+ t.integer "sign_in_count", default: 0, null: false
236
233
  t.datetime "current_sign_in_at"
237
234
  t.datetime "last_sign_in_at"
238
- t.string "current_sign_in_ip"
239
- t.string "last_sign_in_ip"
240
- t.string "confirmation_token"
235
+ t.string "current_sign_in_ip"
236
+ t.string "last_sign_in_ip"
237
+ t.string "confirmation_token"
241
238
  t.datetime "confirmed_at"
242
239
  t.datetime "confirmation_sent_at"
243
- t.string "confirm_success_url"
244
- t.string "unconfirmed_email"
245
- t.string "name"
246
- t.string "nickname"
247
- t.string "image"
248
- t.string "provider"
249
- t.string "uid", default: "", null: false
250
- t.text "tokens"
240
+ t.string "unconfirmed_email"
241
+ t.string "name"
242
+ t.string "nickname"
243
+ t.string "image"
244
+ t.string "provider"
245
+ t.string "uid", default: "", null: false
246
+ t.text "tokens"
251
247
  t.datetime "created_at"
252
248
  t.datetime "updated_at"
253
- t.integer "operating_thetan"
254
- t.string "favorite_color"
249
+ t.integer "operating_thetan"
250
+ t.string "favorite_color"
251
+ t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
252
+ t.index ["email"], name: "index_users_on_email"
253
+ t.index ["nickname"], name: "index_users_on_nickname", unique: true
254
+ t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
255
+ t.index ["uid", "provider"], name: "index_users_on_uid_and_provider", unique: true
255
256
  end
256
257
 
257
- add_index "users", ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
258
- add_index "users", ["email"], name: "index_users_on_email"
259
- add_index "users", ["nickname"], name: "index_users_on_nickname", unique: true
260
- add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
261
- add_index "users", ["uid", "provider"], name: "index_users_on_uid_and_provider", unique: true
262
-
263
258
  end