Auth: remove org count from signedInUser (#72661)

* tweaks

* remove org count from signedinUser

* remove org count from signedinUser store

* fix broken tests

* restore frontend interface
This commit is contained in:
Jo
2023-08-01 14:04:37 +02:00
committed by GitHub
parent a0b0d704d9
commit 7d347cd428
11 changed files with 66 additions and 59 deletions

View File

@@ -211,7 +211,6 @@ type SignedInUser struct {
AuthenticatedBy string
ApiKeyID int64 `xorm:"api_key_id"`
IsServiceAccount bool `xorm:"is_service_account"`
OrgCount int
IsGrafanaAdmin bool
IsAnonymous bool
IsDisabled bool

View File

@@ -396,7 +396,6 @@ func (ss *sqlStore) GetSignedInUser(ctx context.Context, query *user.GetSignedIn
u.is_disabled as is_disabled,
u.help_flags1 as help_flags1,
u.last_seen_at as last_seen_at,
(SELECT COUNT(*) FROM org_user where org_user.user_id = u.id) as org_count,
org.name as org_name,
org_user.role as org_role,
org.id as org_id,