BigW Consortium Gitlab

Commit 6c5b2377 by Rémy Coutable

Use the new Members::DestroyService in group/project member controllers

Signed-off-by: 's avatarRémy Coutable <remy@rymai.me>
parent 4652489f
...@@ -38,7 +38,7 @@ class Groups::GroupMembersController < Groups::ApplicationController ...@@ -38,7 +38,7 @@ class Groups::GroupMembersController < Groups::ApplicationController
return render_403 unless can?(current_user, :destroy_group_member, @group_member) return render_403 unless can?(current_user, :destroy_group_member, @group_member)
@group_member.destroy Members::DestroyService.new(@group_member, current_user).execute
respond_to do |format| respond_to do |format|
format.html { redirect_to group_group_members_path(@group), notice: 'User was successfully removed from group.' } format.html { redirect_to group_group_members_path(@group), notice: 'User was successfully removed from group.' }
......
...@@ -52,7 +52,7 @@ class Projects::ProjectMembersController < Projects::ApplicationController ...@@ -52,7 +52,7 @@ class Projects::ProjectMembersController < Projects::ApplicationController
return render_403 unless can?(current_user, :destroy_project_member, @project_member) return render_403 unless can?(current_user, :destroy_project_member, @project_member)
@project_member.destroy Members::DestroyService.new(@project_member, current_user).execute
respond_to do |format| respond_to do |format|
format.html do format.html do
......
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