diff options
author | Rémy Coutable <remy@rymai.me> | 2017-04-12 12:26:16 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-04-12 12:26:16 +0300 |
commit | 59f81b4ff80862fb7649eba461ba588d6cfee9ec (patch) | |
tree | cbcdf0feb8ebac576a43cfc5595ffa20118b80a1 /app/policies/group_policy.rb | |
parent | c43f7d4713a719d7090d7ec5fbe4a36d233282ad (diff) | |
parent | 0424f3fa73259719ecb409eeafaf732b74739916 (diff) |
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/group_policy.rb')
-rw-r--r-- | app/policies/group_policy.rb | 1 |
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 |