Commit efd2a6de authored by Kerri Miller's avatar Kerri Miller

Merge branch 'update-gitlab-com-group-name-constant' into 'master'

Specify correct finder for gitlab team mebers

See merge request gitlab-org/gitlab!45550
parents a8c179ee a6aac1b5
---
title: Specify correct finder for gitlab team mebers
merge_request: 45550
author:
type: fixed
......@@ -21,7 +21,7 @@ module Gitlab
def self.gitlab_com_user_ids
l1_cache_backend.fetch(ALLOWED_USER_IDS_KEY, expires_in: EXPIRY_TIME_L1_CACHE) do
l2_cache_backend.fetch(ALLOWED_USER_IDS_KEY, expires_in: EXPIRY_TIME_L2_CACHE) do
group = Group.find_by_name(GITLAB_COM_GROUP)
group = Group.find_by(path: GITLAB_COM_GROUP, parent_id: nil)
if group
GroupMembersFinder.new(group).execute.pluck(:user_id)
......
......@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec.describe API::Experiments do
let_it_be(:user) { create(:user) }
let_it_be(:group) { create(:group, name: 'gitlab-com') }
let_it_be(:group) { create(:group, name: 'GitLab.com', path: 'gitlab-com') }
describe 'GET /experiments' do
context 'when on .com' do
......
# frozen_string_literal: true
RSpec.shared_context 'gitlab team member' do
let_it_be(:namespace) { create(:group, name: 'gitlab-com') }
let_it_be(:namespace) { create(:group, name: 'GitLab.com', path: 'gitlab-com') }
before do
namespace.add_developer(user)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment