diff options
-rw-r--r-- | app/models/project_team.rb | 4 | ||||
-rw-r--r-- | spec/models/project_team_spec.rb | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/models/project_team.rb b/app/models/project_team.rb index e8606c8c2c6..04f4fa849c4 100644 --- a/app/models/project_team.rb +++ b/app/models/project_team.rb @@ -248,9 +248,9 @@ class ProjectTeam # group access is developers we need to provide # both group master, developers as devs if int_level == group_link.group_access - im.where("access_level >= ?)", group_link.group_access) + im = im.where("access_level >= ?", group_link.group_access) else - im.send(level) + im = im.send(level) end end diff --git a/spec/models/project_team_spec.rb b/spec/models/project_team_spec.rb index 469e306044b..f979d66c88c 100644 --- a/spec/models/project_team_spec.rb +++ b/spec/models/project_team_spec.rb @@ -111,6 +111,7 @@ describe ProjectTeam, models: true do group_access: Gitlab::Access::REPORTER ) + expect(project.team.guests).to be_empty expect(project.team.reporters).to contain_exactly(group_member.user) end end |