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

Method WithOwner

coderd/rbac/object.go:204–214  ·  view source on GitHub ↗

WithOwner adds an OwnerID to the resource

(ownerID string)

Source from the content-addressed store, hash-verified

202
203// WithOwner adds an OwnerID to the resource
204func (z Object) WithOwner(ownerID string) Object {
205 return Object{
206 ID: z.ID,
207 Owner: ownerID,
208 OrgID: z.OrgID,
209 Type: z.Type,
210 ACLUserList: z.ACLUserList,
211 ACLGroupList: z.ACLGroupList,
212 AnyOrgOwner: z.AnyOrgOwner,
213 }
214}
215
216// WithACLUserList adds an ACL list to a given object
217func (z Object) WithACLUserList(acl map[string][]policy.Action) Object {

Callers 15

createWorkspaceFunction · 0.80
postChatsMethod · 0.80
chatCostSummaryMethod · 0.80
postChatFileMethod · 0.80
convertObjectsMethod · 0.80
benchmarkSetupFunction · 0.80

Calls

no outgoing calls

Tested by 15

benchmarkSetupFunction · 0.64
TestOwnerExecFunction · 0.64
TestRolePermissionsFunction · 0.64
TestAuthorizeDomainFunction · 0.64
TestAuthorizeLevelsFunction · 0.64
TestAuthorizeScopeFunction · 0.64
TestScopeAllowListFunction · 0.64
TestRegoInputValueFunction · 0.64
TestAPIKeyMethod · 0.64
TestChatsMethod · 0.64