From b230335090ee8fa22ab79453e24c1c3c468569df Mon Sep 17 00:00:00 2001 From: Douwe Maan <douwe@gitlab.com> Date: Tue, 28 Jul 2015 17:52:38 +0200 Subject: [PATCH] Show Leave button when you're the last owner, so that the error explains the reason --- app/views/dashboard/groups/index.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/dashboard/groups/index.html.haml b/app/views/dashboard/groups/index.html.haml index b75c11795bd..6ef4d752ac3 100644 --- a/app/views/dashboard/groups/index.html.haml +++ b/app/views/dashboard/groups/index.html.haml @@ -23,7 +23,7 @@ %i.fa.fa-cogs Settings - - if can?(current_user, :destroy_group_member, group_member) + - if can?(current_user, :admin_group_member, group) = link_to leave_group_group_members_path(group), data: { confirm: leave_group_message(group.name) }, method: :delete, class: "btn-sm btn btn-grouped", title: 'Leave this group' do %i.fa.fa-sign-out Leave -- GitLab