mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user