diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-05-03 14:30:42 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-05-03 14:30:42 +0200 |
commit | bdda1eeddeb8a49484d221ae7217a9983bf984c4 (patch) | |
tree | 32ba277d7158d1a25d5eae52f9dc88ca9c8b1f5c | |
parent | 774af93027a5e1758adac00eb61178ecd85567ed (diff) | |
download | gitlab-ce-bdda1eeddeb8a49484d221ae7217a9983bf984c4.tar.gz |
Fix 404 on group page if user is not member of page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | app/views/layouts/nav/_group.html.haml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/layouts/nav/_group.html.haml b/app/views/layouts/nav/_group.html.haml index 87ee765b8f2..0971bccfcd4 100644 --- a/app/views/layouts/nav/_group.html.haml +++ b/app/views/layouts/nav/_group.html.haml @@ -12,11 +12,11 @@ = link_to projects_group_path(@group), title: 'Projects' do Projects %li.divider - - if @group && can?(current_user, :admin_group, @group) + - if can?(current_user, :admin_group, @group) %li = link_to edit_group_path(@group) do Edit Group - - if access = @group.users.find(current_user.id) + - if access = @group.users.find_by(id: current_user.id) %li = link_to leave_group_group_members_path(@group), data: { confirm: leave_group_message(@group.name) }, method: :delete, title: 'Leave group' do |