# Bug COMMS-614 - API V3 allows reading/writing internal comments when the "Enable internal comments" project setting is disabled

Project: Stream Communicator
Status: closed
URL: https://community.openproject.org/work_packages/COMMS-614

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | High |
| Module | Modules and project features / Comments and activity |
| Target versions | 17.1.0 |
| Observed in versions | 17.0.0 |
| Sprint |  |
| Backlog bucket |  |
| Bug found in version (deprecated) | 17.0.x |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers | Kabiru Mwenja |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

### Summary

The API v3 allows reading/writing internal comments when the `enabled_internal_comments` project setting is disabled or when the EnterpriseToken doesn't allow internal comments.

 Additionally, client apps need a way to check whether internal comments are enabled/possible for a specific project.

### Steps to reproduce

1.   In the OpenProject Web UI, go to Project Settings and **disable** "Enable internal comments." (or remove enterprise token allowing internal comments)

2.  As a user with view\_internal\_comments permission, call `GET /api/v3/work_packages/:id/activities`

3.  Internal comments are still visible in the response

4.  As a user with `add_internal_comments` permission, call POST /api/v3/work\_packages/:id/activities with internal: true

5.  Internal comment is created despite the project setting being disabled

### Expected behavior

1.  **Enforcement**: Internal comments should only be readable/writable when ALL conditions are met:
    
    1.  EnterpriseToken allows internal\_comments
    
    2.  Project setting enabled\_internal\_comments is true
    
    3.  User has the appropriate permission

2.  **Mobile App Support**: A project-scoped configuration endpoint `GET /api/v3/projects/:id/configuration` should return:
    
    1.  All global configuration properties (including `availableFeatures` for enterprise token check)
    
    2.  `enabledInternalComments` - the project setting (boolean, defaults to false)
