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

Method RBACObject

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

Source from the content-addressed store, hash-verified

194}
195
196func (c Chat) RBACObject() rbac.Object {
197 obj := rbac.ResourceChat.
198 WithID(c.ID).
199 WithOwner(c.OwnerID.String()).
200 InOrg(c.OrganizationID)
201
202 if rbac.ChatACLDisabled() {
203 return obj
204 }
205
206 return obj.
207 WithACLUserList(c.UserACL.RBACACL()).
208 WithGroupACL(c.GroupACL.RBACACL())
209}
210
211func (c Chat) IsSubChat() bool {
212 return c.RootChatID.Valid || c.ParentChatID.Valid

Callers 1

TestChatACLDisabledFunction · 0.95

Calls 8

ChatACLDisabledFunction · 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 1

TestChatACLDisabledFunction · 0.76