diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-07-24 17:20:54 +0800 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-07-25 15:35:06 +0800 |
commit | 1ce5bcacdbf56682e05fa63875203bf4d10584bc (patch) | |
tree | d46baea2e6f30ff63553f76624fe0b314227a732 /app/policies | |
parent | ba997f3c428d94adfc9a2eb4eb0daaa3d759c4df (diff) | |
download | gitlab-ce-1ce5bcacdbf56682e05fa63875203bf4d10584bc.tar.gz |
Remove code related to object hierarchy in MySQLremove-nested-groups-checks
These are not required because MySQL is not
supported anymore
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/group_policy.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb index 0add8bfad31..84b1873c05d 100644 --- a/app/policies/group_policy.rb +++ b/app/policies/group_policy.rb @@ -16,8 +16,6 @@ class GroupPolicy < BasePolicy condition(:maintainer) { access_level >= GroupMember::MAINTAINER } condition(:reporter) { access_level >= GroupMember::REPORTER } - condition(:nested_groups_supported, scope: :global) { Group.supports_nested_objects? } - condition(:has_parent, scope: :subject) { @subject.has_parent? } condition(:share_with_group_locked, scope: :subject) { @subject.share_with_group_lock? } condition(:parent_share_with_group_locked, scope: :subject) { @subject.parent&.share_with_group_lock? } @@ -108,8 +106,8 @@ class GroupPolicy < BasePolicy enable :read_nested_project_resources end - rule { owner & nested_groups_supported }.enable :create_subgroup - rule { maintainer & maintainer_can_create_group & nested_groups_supported }.enable :create_subgroup + rule { owner }.enable :create_subgroup + rule { maintainer & maintainer_can_create_group }.enable :create_subgroup rule { public_group | logged_in_viewable }.enable :view_globally |