diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 0c343b8c3..5d05c3b27 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -4,9 +4,9 @@ class UsersController < ApplicationController include Helpers::Email include Modules::SearchFilter - before_action :authenticate_user! + before_action :authenticate_user!, except: %i[resend_invite] before_action :find_resource, except: %i[new create] - before_action :authenticate_scope!, except: %i[new] + before_action :authenticate_scope!, except: %i[new resend_invite] def index redirect_to users_organisation_path(current_user.organisation) unless current_user.support? @@ -29,6 +29,12 @@ class UsersController < ApplicationController end end + def resend_invite + @user.send_confirmation_instructions + flash[:notice] = "Invitation sent" + render :show + end + def show; end def dpo; end diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index c6b197b20..f1c8b1689 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -94,27 +94,16 @@ <% end %>