Commit b2303350 authored by Douwe Maan's avatar Douwe Maan

Show Leave button when you're the last owner, so that the error explains the reason

parent 45acfdd3
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
%i.fa.fa-cogs %i.fa.fa-cogs
Settings 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 = 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 %i.fa.fa-sign-out
Leave Leave
......
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