Sha256: 4f82583f60e236547d48358a347d540ad2497b2ef4666df9f010d01ddb45fc0d

Contents?: true

Size: 705 Bytes

Versions: 1

Compression:

Stored size: 705 Bytes

Contents

# frozen_string_literal: true

namespace :eac_users_support do
  desc <<~DESCRIPTION
    Reseta a senha do usuário e permite setá-lo como administrador.

    Exemplos:

      # Reseta a senha do usuário "fulano@example.com" para "fulano@example.com".
      bin/rake eac_users_support:password_reset[fulano@example.com]

      # Reseta a senha do usuário "fulano@example.com" para "fulano@example.com"
      # e seta-o como administrador.
      bin/rake eac_users_support:password_reset[fulano@example.com,1]
  DESCRIPTION
  task :password_reset, %i[email administrator] => :environment do |_t, args|
    EacUsersSupport::Tasks::PasswordReset.new(args.email, args.administrator.present?).run
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
eac_users_support-0.11.1 lib/tasks/eac_users_support.rake