Skip to content

Commit

Permalink
fix: Show correct template owner for ex-team members (#9331)
Browse files Browse the repository at this point in the history
Without this fix the edit controls were shown but did not work.
  • Loading branch information
Dschoordsch committed Jan 15, 2024
1 parent 2140f61 commit 57cf084
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/server/graphql/public/types/MeetingTemplate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const MeetingTemplate: MeetingTemplateResolvers = {
if (teamId === 'aGhostTeam') return 'PUBLIC'
const viewerId = getUserId(authToken)
const teamMemberId = TeamMemberId.join(teamId, viewerId)
const team = await dataLoader.get('teamMembers').load(teamMemberId)
const isViewerOnOwningTeam = !!team
const teamMember = await dataLoader.get('teamMembers').load(teamMemberId)
const isViewerOnOwningTeam = teamMember && teamMember.isNotRemoved
// public user-defined templates are not visible outside their org
return isViewerOnOwningTeam ? 'TEAM' : 'ORGANIZATION'
}
Expand Down

0 comments on commit 57cf084

Please sign in to comment.