(ctx context.Context, arg database.GetConnectionLogsOffsetParams)
| 3301 | } |
| 3302 | |
| 3303 | func (q *querier) GetConnectionLogsOffset(ctx context.Context, arg database.GetConnectionLogsOffsetParams) ([]database.GetConnectionLogsOffsetRow, error) { |
| 3304 | // Just like with the audit logs query, shortcut if the user is an owner. |
| 3305 | err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceConnectionLog) |
| 3306 | if err == nil { |
| 3307 | return q.db.GetConnectionLogsOffset(ctx, arg) |
| 3308 | } |
| 3309 | |
| 3310 | prep, err := prepareSQLFilter(ctx, q.auth, policy.ActionRead, rbac.ResourceConnectionLog.Type) |
| 3311 | if err != nil { |
| 3312 | return nil, xerrors.Errorf("(dev error) prepare sql filter: %w", err) |
| 3313 | } |
| 3314 | |
| 3315 | return q.db.GetAuthorizedConnectionLogsOffset(ctx, arg, prep) |
| 3316 | } |
| 3317 | |
| 3318 | func (q *querier) GetCryptoKeyByFeatureAndSequence(ctx context.Context, arg database.GetCryptoKeyByFeatureAndSequenceParams) (database.CryptoKey, error) { |
| 3319 | if err := q.authorizeContext(ctx, policy.ActionRead, rbac.ResourceCryptoKey); err != nil { |
no test coverage detected