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

Method InsertFile

coderd/database/dbauthz/dbauthz.go:5606–5608  ·  view source on GitHub ↗
(ctx context.Context, arg database.InsertFileParams)

Source from the content-addressed store, hash-verified

5604}
5605
5606func (q *querier) InsertFile(ctx context.Context, arg database.InsertFileParams) (database.File, error) {
5607 return insert(q.log, q.auth, rbac.ResourceFile.WithOwner(arg.CreatedBy.String()), q.db.InsertFile)(ctx, arg)
5608}
5609
5610func (q *querier) InsertGitSSHKey(ctx context.Context, arg database.InsertGitSSHKeyParams) (database.GitSSHKey, error) {
5611 return insertWithAction(q.log, q.auth, rbac.ResourceUser.WithOwner(arg.UserID.String()).WithID(arg.UserID), policy.ActionUpdatePersonal, q.db.InsertGitSSHKey)(ctx, arg)

Callers

nothing calls this directly

Calls 3

insertFunction · 0.85
WithOwnerMethod · 0.80
StringMethod · 0.45

Tested by

no test coverage detected