Skip to content

Commit e252bc3

Browse files
committed
feat: add lockable setting
1 parent a4214e0 commit e252bc3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

app/models/spree/user.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ class User < Spree::Base
88
:rememberable, :trackable, :validatable, :encryptable
99
devise :confirmable if Spree::Auth::Config[:confirmable]
1010
devise :omniauthable, omniauth_providers: Spree::Auth::Config[:omniauthable] if Spree::Auth::Config[:omniauthable].present?
11+
devise :lockable if Spree::Auth::Config[:lockable].present?
1112

1213
if defined?(Spree::SoftDeletable)
1314
include Spree::SoftDeletable

lib/spree/auth_configuration.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ class AuthConfiguration < Preferences::Configuration
55
preference :registration_step, :boolean, default: true
66
preference :signout_after_password_change, :boolean, default: true
77
preference :confirmable, :boolean, default: false
8-
preference :omniauthable_providers, :array, default: []
8+
preference :lockable, :boolean, default: false
9+
preference :omniauthable, :array, default: []
910
preference :draw_frontend_routes, :boolean, default: true
1011
preference :draw_backend_routes, :boolean, default: true
1112
end

0 commit comments

Comments
 (0)