Auth: Add empty role usage metrics for service and user accounts (#73108)
* Add tests for service accounts metrics usage * Add service account store implementation * Add service account service implementation * Add tests for org metrics usage * Add org implementation * Add service implementation
This commit is contained in:
@@ -72,6 +72,14 @@ func (s *Service) GetUsageStats(ctx context.Context) map[string]interface{} {
|
||||
}
|
||||
|
||||
stats["stats.case_insensitive_login.count"] = caseInsensitiveLoginVal
|
||||
|
||||
count, err := s.store.CountUserAccountsWithEmptyRole(ctx)
|
||||
if err != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
stats["stats.user.role_none.count"] = count
|
||||
|
||||
return stats
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user