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