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

Method RBACObject

coderd/database/modelmethods.go:176–194  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

174}
175
176func (t Task) RBACObject() rbac.Object {
177 obj := rbac.ResourceTask.
178 WithID(t.ID).
179 WithOwner(t.OwnerID.String()).
180 InOrg(t.OrganizationID)
181
182 if rbac.WorkspaceACLDisabled() {
183 return obj
184 }
185
186 if t.WorkspaceGroupACL != nil {
187 obj = obj.WithGroupACL(t.WorkspaceGroupACL.RBACACL())
188 }
189 if t.WorkspaceUserACL != nil {
190 obj = obj.WithACLUserList(t.WorkspaceUserACL.RBACACL())
191 }
192
193 return obj
194}
195
196func (c Chat) RBACObject() rbac.Object {
197 obj := rbac.ResourceChat.

Callers

nothing calls this directly

Calls 8

WorkspaceACLDisabledFunction · 0.92
InOrgMethod · 0.80
WithOwnerMethod · 0.80
WithGroupACLMethod · 0.80
WithACLUserListMethod · 0.80
WithIDMethod · 0.45
StringMethod · 0.45
RBACACLMethod · 0.45

Tested by

no test coverage detected