MCPcopy Index your code
hub / github.com/coder/coder / DeleteOldAuditLogConnectionEvents

Method DeleteOldAuditLogConnectionEvents

coderd/database/dbauthz/dbauthz.go:2168–2176  ·  view source on GitHub ↗
(ctx context.Context, threshold database.DeleteOldAuditLogConnectionEventsParams)

Source from the content-addressed store, hash-verified

2166}
2167
2168func (q *querier) DeleteOldAuditLogConnectionEvents(ctx context.Context, threshold database.DeleteOldAuditLogConnectionEventsParams) error {
2169 // `ResourceSystem` is deprecated, but it doesn't make sense to add
2170 // `policy.ActionDelete` to `ResourceAuditLog`, since this is the one and
2171 // only time we'll be deleting from the audit log.
2172 if err := q.authorizeContext(ctx, policy.ActionDelete, rbac.ResourceSystem); err != nil {
2173 return err
2174 }
2175 return q.db.DeleteOldAuditLogConnectionEvents(ctx, threshold)
2176}
2177
2178func (q *querier) DeleteOldAuditLogs(ctx context.Context, arg database.DeleteOldAuditLogsParams) (int64, error) {
2179 if err := q.authorizeContext(ctx, policy.ActionDelete, rbac.ResourceSystem); err != nil {

Callers

nothing calls this directly

Calls 2

authorizeContextMethod · 0.95

Tested by

no test coverage detected