Commit 4c060074 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Skip auth for group page but return auth for other group pages

parent b7431ec0
......@@ -146,7 +146,6 @@
}
.collapse-nav a {
left: 0px;
width: $sidebar_collapsed_width;
}
......@@ -165,6 +164,7 @@
width: $sidebar_width;
position: fixed;
bottom: 0;
left: 0;
font-size: 13px;
background: transparent;
height: 40px;
......
......@@ -4,7 +4,7 @@ class GroupsController < Groups::ApplicationController
before_action :group, except: [:new, :create]
# Authorize
before_action :authorize_read_group!, except: [:new, :create]
before_action :authorize_read_group!, except: [:show, :new, :create]
before_action :authorize_admin_group!, only: [:edit, :update, :destroy, :projects]
before_action :authorize_create_group!, only: [:new, :create]
......
......@@ -54,7 +54,7 @@ class Ability
nil
end
if group
if group && group.public_profile?
[:read_group]
else
[]
......
......@@ -119,6 +119,10 @@ class Group < Namespace
end
end
def public_profile?
projects.public_only.any?
end
def post_create_hook
Gitlab::AppLogger.info("Group \"#{name}\" was created")
......
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