feat: add chat sharing foundation (#25041)

This commit is contained in:
Danielle Maywood
2026-05-18 22:32:05 +01:00
committed by GitHub
parent 2732378da2
commit 170a6e1fe9
49 changed files with 1872 additions and 103 deletions
+16 -1
View File
@@ -194,7 +194,22 @@ func (t Task) RBACObject() rbac.Object {
}
func (c Chat) RBACObject() rbac.Object {
return rbac.ResourceChat.WithID(c.ID).WithOwner(c.OwnerID.String()).InOrg(c.OrganizationID)
obj := rbac.ResourceChat.
WithID(c.ID).
WithOwner(c.OwnerID.String()).
InOrg(c.OrganizationID)
if rbac.ChatACLDisabled() {
return obj
}
return obj.
WithACLUserList(c.UserACL.RBACACL()).
WithGroupACL(c.GroupACL.RBACACL())
}
func (c Chat) IsSubChat() bool {
return c.RootChatID.Valid || c.ParentChatID.Valid
}
func (r GetChatsRow) RBACObject() rbac.Object {