feat: Improved password security policy (#2345)

Co-authored-by: Pranav Raj S <pranav@chatwoot.com>
This commit is contained in:
Sojan Jose
2021-06-07 17:26:08 +05:30
committed by GitHub
parent d1b3c7b0c2
commit 467b45b427
36 changed files with 284 additions and 151 deletions

View File

@@ -0,0 +1,5 @@
class RemoveSuperAdminAccessTokes < ActiveRecord::Migration[6.0]
def change
AccessToken.where(owner_type: 'SuperAdmin').destroy_all
end
end

View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2021_05_20_200729) do
ActiveRecord::Schema.define(version: 2021_05_27_173755) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"

View File

@@ -10,13 +10,13 @@ end
## Seeds for Local Development
unless Rails.env.production?
SuperAdmin.create!(email: 'john@acme.inc', password: '123456')
SuperAdmin.create!(email: 'john@acme.inc', password: 'Password1!')
account = Account.create!(
name: 'Acme Inc'
)
user = User.new(name: 'John', email: 'john@acme.inc', password: '123456')
user = User.new(name: 'John', email: 'john@acme.inc', password: 'Password1!')
user.skip_confirmation!
user.save!