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

Function ResourceUserObject

coderd/rbac/object.go:16–18  ·  view source on GitHub ↗

ResourceUserObject is a helper function to create a user object for authz checks.

(userID uuid.UUID)

Source from the content-addressed store, hash-verified

14
15// ResourceUserObject is a helper function to create a user object for authz checks.
16func ResourceUserObject(userID uuid.UUID) Object {
17 return ResourceUser.WithID(userID).WithOwner(userID.String())
18}
19
20// Object is used to create objects for authz checks when you have none in
21// hand to run the check on.

Callers 15

convertObjectsMethod · 0.92
TestRolePermissionsFunction · 0.92
RBACObjectMethod · 0.92
RBACObjectMethod · 0.92
RBACObjectMethod · 0.92
RBACObjectMethod · 0.92
RBACObjectMethod · 0.92
RBACObjectMethod · 0.92
GetUsersByIDsMethod · 0.92

Calls 3

WithOwnerMethod · 0.80
WithIDMethod · 0.45
StringMethod · 0.45

Tested by 2

TestRolePermissionsFunction · 0.74
TestUserMethod · 0.74