Unverified Commit 3be109df authored by Ahmad Farhat's avatar Ahmad Farhat Committed by GitHub
Browse files

Fixed user create rake task (#1690)

parent b0de03cc
......@@ -36,13 +36,13 @@ namespace :user do
exit
end
if u[:role] == "super_admin"
user.remove_role(:user)
user.set_role(:super_admin)
elsif u[:role] == "admin"
user.set_role(:admin)
unless Role.exists?(name: u[:role], provider: u[:provider])
puts "Invalid Role - Role does not exist"
exit
end
user.set_role(u[:role])
puts "Account succesfully created."
puts "Email: #{u[:email]}"
puts "Password: #{u[:password]}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment