summaryrefslogtreecommitdiff
path: root/app/controllers/namespaces_controller.rb
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2016-03-08 21:01:33 -0300
committerFelipe Artur <felipefac@gmail.com>2016-03-10 10:38:36 -0300
commitc3e70280dffe7ee0859ebd73b902d424ca5f809a (patch)
tree06b83a5ab13d19803332253cf50a941501b29317 /app/controllers/namespaces_controller.rb
parentbd59e59d01c5e845c7f7d451feaa1488670f20de (diff)
downloadgitlab-ce-c3e70280dffe7ee0859ebd73b902d424ca5f809a.tar.gz
Prevent projects to have higher visibility than groups
Prevent Groups to have smaller visibility than projects Add default_group_visibility_level to configuration Code improvements
Diffstat (limited to 'app/controllers/namespaces_controller.rb')
-rw-r--r--app/controllers/namespaces_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/namespaces_controller.rb b/app/controllers/namespaces_controller.rb
index 282012c60a1..5a94dcb0dbd 100644
--- a/app/controllers/namespaces_controller.rb
+++ b/app/controllers/namespaces_controller.rb
@@ -14,7 +14,7 @@ class NamespacesController < ApplicationController
if user
redirect_to user_path(user)
- elsif group
+ elsif group && can?(current_user, :read_group, namespace)
redirect_to group_path(group)
elsif current_user.nil?
authenticate_user!