(ctx context.Context, arg database.CountConnectionLogsParams)
| 1827 | } |
| 1828 | |
| 1829 | func (q *querier) CountConnectionLogs(ctx context.Context, arg database.CountConnectionLogsParams) (int64, error) { |
| 1830 | // Just like the actual query, shortcut if the user is an owner. |
| 1831 | err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceConnectionLog) |
| 1832 | if err == nil { |
| 1833 | return q.db.CountConnectionLogs(ctx, arg) |
| 1834 | } |
| 1835 | prep, err := prepareSQLFilter(ctx, q.auth, policy.ActionRead, rbac.ResourceConnectionLog.Type) |
| 1836 | if err != nil { |
| 1837 | return 0, xerrors.Errorf("(dev error) prepare sql filter: %w", err) |
| 1838 | } |
| 1839 | return q.db.CountAuthorizedConnectionLogs(ctx, arg, prep) |
| 1840 | } |
| 1841 | |
| 1842 | func (q *querier) CountEnabledModelsWithoutPricing(ctx context.Context) (int64, error) { |
| 1843 | if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceDeploymentConfig); err != nil { |
no test coverage detected