demarches-normaliennes/app/controllers/manager/users_controller.rb

25 lines
616 B
Ruby
Raw Normal View History

2018-05-31 15:18:06 +02:00
module Manager
class UsersController < Manager::ApplicationController
def resend_confirmation_instructions
user = User.find(params[:id])
user.resend_confirmation_instructions
2018-09-19 15:05:26 +02:00
flash[:notice] = "L'email d'activation de votre compte a été renvoyé."
redirect_to manager_user_path(user)
end
2019-07-04 12:36:17 +02:00
def enable_feature
user = User.find(params[:id])
params[:features].each do |key, enable|
if enable
Flipper.enable_actor(key.to_sym, user)
else
Flipper.disable_actor(key.to_sym, user)
end
end
head :ok
end
2018-05-31 15:18:06 +02:00
end
end