Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions apps/condo/domains/ticket/access/TicketComment.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ async function canReadTicketComments (args) {

return {
...accessFilter,
type: ORGANIZATION_COMMENT_TYPE,
}
Comment on lines 43 to 46

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore resident comment isolation for service users

canReadTicketComments for service accounts now returns the B2B access filter without the previous type: ORGANIZATION_COMMENT_TYPE constraint, so any B2B service user with canReadTicketComments permission can list resident-channel comments for all organizations in their token. That exposes resident conversations to third‑party integrations and contradicts the still stricter file access rule in TicketCommentFile.js (service users there are limited to organization comments), suggesting resident messages were meant to stay private. Consider keeping a type filter or gating resident comments on an explicit permission.

Useful? React with 👍 / 👎.

}

Expand Down Expand Up @@ -87,12 +86,6 @@ const checkManageCommentAccess = async (args) => {
const hasAccess = await canManageObjectsAsB2BAppServiceUser(args)
if (!hasAccess) return false

// service user can't create ticket comment with resident type or update type to resident
const resolvedCommentType = get(originalInput, 'type')
if (resolvedCommentType === RESIDENT_COMMENT_TYPE) {
return false
}

// service user can't update not his own ticket comment
if (operation === 'update') {
const comment = await getByCondition('TicketComment', { id: itemId, deletedAt: null })
Expand Down
Loading