I’ve been doing some work integrating SuiteCRM with AI agents and ran into an interesting issue trying to retrieve Project Tasks through the V8 API in 7.15.2.
Despite granting the API user the appropriate permissions for Project Tasks, the following request fails:
GET /Api/V8/module/ProjectTask
With the error:
The API user does not have access to this module.
After digging through the source code, I’ve identified the issue in Api/V8/Helper/ModuleAccessChecker.php.
The API determines module availability based on the displayed navigation modules. However, ProjectTask is registered in $modInvisList rather than $moduleList in include/modules.php.
Consequently, the API rejects the request before it even gets to the record-level ACL checks, regardless of the permissions granted to the user.
I’ve reproduced this against a clean 7.15.2 source baseline.
Interestingly, I also found an older forum discussion where users were successfully creating ProjectTask records through the V8 API in 7.11.2, so I suspect this may be a regression.
The fix itself is relatively straightforward, but I’m struggling a bit with what the correct approach should be. @suitecrm_team
There are three possibilities I can think of:
-
Add ProjectTask to the standard module list.
-
Add a specific exception for ProjectTask in ModuleAccessChecker, while retaining the existing ACL checks.
-
Introduce a configurable list of additional API-accessible modules in
config_override.php, which would still be subject to normal ACL checks.
On a related note, I’ve always wondered why Project Tasks aren’t available directly from the navigation menu in the first place. Personally, I’d find it quite useful to access the Project Task list without having to open individual Projects first.
Does anyone know if there is a particular historical or technical reason why ProjectTask is excluded from the standard module list?
Also, are there other legitimate modules that are intentionally hidden from navigation but should be accessible through the API?
I’m happy to put together a patch, but I’d like to get some input from the community on the preferred approach before doing so.