summaryrefslogtreecommitdiff
path: root/app/policies
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-04-12 09:26:16 +0000
committerRémy Coutable <remy@rymai.me>2017-04-12 09:26:16 +0000
commit59f81b4ff80862fb7649eba461ba588d6cfee9ec (patch)
treecbcdf0feb8ebac576a43cfc5595ffa20118b80a1 /app/policies
parentc43f7d4713a719d7090d7ec5fbe4a36d233282ad (diff)
parent0424f3fa73259719ecb409eeafaf732b74739916 (diff)
downloadgitlab-ce-59f81b4ff80862fb7649eba461ba588d6cfee9ec.tar.gz
Merge branch 'siemens/gitlab-ce-fix/subgroup-hide-button' into 'master'
Hide new subgroup button if user has no permission to create one Closes #30139 See merge request !10627
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/group_policy.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb
index cb58c115d54..87398303c68 100644
--- a/app/policies/group_policy.rb
+++ b/app/policies/group_policy.rb
@@ -28,6 +28,7 @@ class GroupPolicy < BasePolicy
can! :admin_namespace
can! :admin_group_member
can! :change_visibility_level
+ can! :create_subgroup if @user.can_create_group
end
if globally_viewable && @subject.request_access_enabled && !member