Skip to content

Commit 398e3af

Browse files
committed
Fix the entitlements team cache when there are multiple instances of GitHub in use.
1 parent 1e87a3c commit 398e3af

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/entitlements/backend/github_team/service.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ class TeamNotFound < RuntimeError; end
3535
def initialize(addr: nil, org:, token:, ou:, ignore_not_found: false)
3636
super
3737
Entitlements.cache[:github_team_members] ||= {}
38-
Entitlements.cache[:github_team_members][org] ||= {}
39-
@team_cache = Entitlements.cache[:github_team_members][org]
38+
Entitlements.cache[:github_team_members][addr] ||= {}
39+
Entitlements.cache[:github_team_members][addr][org] ||= {}
40+
@team_cache = Entitlements.cache[:github_team_members][addr][org]
4041
end
4142

4243
# Read a single team identified by its slug and return a team object.

0 commit comments

Comments
 (0)