diff options
Diffstat (limited to 'lib/feature_groups/gitlab_team_members.rb')
-rw-r--r-- | lib/feature_groups/gitlab_team_members.rb | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/feature_groups/gitlab_team_members.rb b/lib/feature_groups/gitlab_team_members.rb deleted file mode 100644 index 7f4c597fddd..00000000000 --- a/lib/feature_groups/gitlab_team_members.rb +++ /dev/null @@ -1,31 +0,0 @@ -# frozen_string_literal: true - -module FeatureGroups - class GitlabTeamMembers - GITLAB_COM_GROUP_ID = 6543 - - class << self - def enabled?(thing) - return false unless Gitlab.com? - - team_member?(thing) - end - - private - - def team_member?(thing) - thing.is_a?(::User) && gitlab_com_member_ids.include?(thing.id) - end - - def gitlab_com - @gitlab_com ||= ::Group.find(GITLAB_COM_GROUP_ID) - end - - def gitlab_com_member_ids - Rails.cache.fetch("gitlab_team_members", expires_in: 1.hour) do - gitlab_com.members.pluck_user_ids.to_set - end - end - end - end -end |