diff options
author | James Lopez <james@gitlab.com> | 2019-05-02 06:35:06 +0000 |
---|---|---|
committer | James Lopez <james@gitlab.com> | 2019-05-02 06:35:06 +0000 |
commit | 2b3b0bb1847e5d910b3e5dc5e151f194c12d3907 (patch) | |
tree | 2fc45e9e88dcf2d2c916cd2baf5ff2da243d152c /spec/models | |
parent | 6835a64d575ddcaa460d82ad224e208ef448840e (diff) | |
parent | 32ddc3fed616b9eebdd7b5553d4aa08c0572ff1d (diff) | |
download | gitlab-ce-2b3b0bb1847e5d910b3e5dc5e151f194c12d3907.tar.gz |
Merge branch 'sh-allow-equal-level-in-subgroup-membership' into 'master'
Allow a member to have an access level equal to parent group
Closes gitlab-ee#11323
See merge request gitlab-org/gitlab-ce!27913
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/member_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/member_spec.rb b/spec/models/member_spec.rb index c68c3ce2abe..782a84f922b 100644 --- a/spec/models/member_spec.rb +++ b/spec/models/member_spec.rb @@ -70,6 +70,16 @@ describe Member do expect(child_member).not_to be_valid end + # Membership in a subgroup confers certain access rights, such as being + # able to merge or push code to protected branches. + it "is valid with an equal level" do + child_member.access_level = GroupMember::DEVELOPER + + child_member.validate + + expect(child_member).to be_valid + end + it "is valid with a higher level" do child_member.access_level = GroupMember::MAINTAINER |