Serviceaccounts: Do not display service accounts assigned to team (#48995)
* Add IsServiceAccount to query * test for excluding service accounts in query * align test * test update * added logging * should fix tests * moved test to bottom * add back setup function * Remove IsServiceAccount from query Instead use false for is_service_account and when the time comes to implement service accounts for team. we deal with it * missed teamtest * formatting
This commit is contained in:
@@ -535,6 +535,9 @@ func (ss *SQLStore) getTeamMembers(ctx context.Context, query *models.GetTeamMem
|
||||
fmt.Sprintf("team_member.user_id=%s.%s", ss.Dialect.Quote("user"), ss.Dialect.Quote("id")),
|
||||
)
|
||||
|
||||
// explicitly check for serviceaccounts
|
||||
sess.Where(fmt.Sprintf("%s.is_service_account=?", ss.Dialect.Quote("user")), ss.Dialect.BooleanStr(false))
|
||||
|
||||
if acUserFilter != nil {
|
||||
sess.Where(acUserFilter.Where, acUserFilter.Args...)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user