mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 07:10:12 +01:00
Add rake task to check for deprecated password hashes
This commit is contained in:
parent
64fddeaf7a
commit
1a593d9796
1 changed files with 10 additions and 0 deletions
|
|
@ -20,5 +20,15 @@ namespace :tracks do
|
|||
user.errors.each_full { |msg| puts "- #{msg}\n" }
|
||||
end
|
||||
end
|
||||
|
||||
desc 'Check all passwords for deprecated hashes'
|
||||
task :check_passwords => :environment do
|
||||
puts "The following users have deprecated password hashes:"
|
||||
User.all.each do |user|
|
||||
if user.uses_deprecated_password?
|
||||
puts " #{user.login}"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue