Skip to content

Commit 3e7eaac

Browse files
hotfix for user auth check added on active apps (#429)
1 parent cd4bb09 commit 3e7eaac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/sql/repository/team/TeamRepository.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ func (repo TeamRepositoryImpl) FindTeamByAppName(appName string) (*Team, error)
9292
team := &Team{}
9393
err := repo.dbConnection.Model(team).Column("team.*").
9494
Join("inner join app a on a.team_id = team.id").Where("a.app_name = ?", appName).
95-
Select()
95+
Where("a.active = ?", true).Select()
9696
return team, err
9797
}
9898

9999
func (repo TeamRepositoryImpl) FindTeamByAppNameV2() ([]*TeamRbacObjects, error) {
100100
var rbacObjects []*TeamRbacObjects
101101
err := repo.dbConnection.Model(&rbacObjects).Column("a.app_name as appName, a.id as appId, team.name as teamName").
102-
Join("inner join app a on a.team_id = team.id").
102+
Join("inner join app a on a.team_id = team.id").Where("a.active = ?", true).
103103
Select()
104104
return rbacObjects, err
105105
}

0 commit comments

Comments
 (0)