ServiceAccounts: enable service accounts after IsRealUser change (#58263)

* suppor service accounts

* add: IsServiceAccount to scheduleUser in scheduler

Co-authored-by: eleijonmarck <eric.leijonmarck@gmail.com>
This commit is contained in:
Ryan McKinley
2022-11-04 12:53:35 -07:00
committed by GitHub
parent d80abd173b
commit e6a9fa1cf9
3 changed files with 74 additions and 5 deletions

View File

@@ -306,6 +306,9 @@ func (u *SignedInUser) GetCacheKey() (string, error) {
if u.IsApiKeyUser() {
return fmt.Sprintf("%d-apikey-%d", u.OrgID, u.ApiKeyID), nil
}
if u.IsServiceAccountUser() { // not considered a real user
return fmt.Sprintf("%d-service-%d", u.OrgID, u.UserID), nil
}
return "", ErrNoUniqueID
}