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

Method InsertUserLink

coderd/database/dbauthz/dbauthz.go:5877–5882  ·  view source on GitHub ↗

TODO: Should this be in system.go?

(ctx context.Context, arg database.InsertUserLinkParams)

Source from the content-addressed store, hash-verified

5875
5876// TODO: Should this be in system.go?
5877func (q *querier) InsertUserLink(ctx context.Context, arg database.InsertUserLinkParams) (database.UserLink, error) {
5878 if err := q.authorizeContext(ctx, policy.ActionUpdate, rbac.ResourceUserObject(arg.UserID)); err != nil {
5879 return database.UserLink{}, err
5880 }
5881 return q.db.InsertUserLink(ctx, arg)
5882}
5883
5884func (q *querier) InsertUserSkill(ctx context.Context, arg database.InsertUserSkillParams) (database.UserSkill, error) {
5885 obj := rbac.ResourceUserSkill.WithOwner(arg.UserID.String())

Callers

nothing calls this directly

Calls 3

authorizeContextMethod · 0.95
ResourceUserObjectFunction · 0.92
InsertUserLinkMethod · 0.65

Tested by

no test coverage detected