Statistics and permissions sections in groups/../projects API is not available
Summary
It seems there is a difference between a top-level projects-listing API and a group projects-listing API. In the latter there are no statistics and permissions sections.
Steps to reproduce
Being authenticated with and user who has admin permissions over the project, compare output of the following two calls:
https://gitlab.com/api/v4/groups/2094972/projects?statistics=true&id_after=10596286&id_before=10596288
https://gitlab.com/api/v4/projects?statistics=true&id_after=10596286&id_before=10596288
What is the current bug behavior?
Results should be the same, but they are not. The later has also:
"statistics": {
"commit_count": 132,
"storage_size": 1556136,
"repository_size": 314572,
"wiki_size": 52428,
"lfs_objects_size": 0,
"job_artifacts_size": 1189136
},
"permissions": {
"project_access": null,
"group_access": {
"access_level": 50,
"notification_level": 2
}
},
What is the expected correct behavior?
The output should be the same.
Output of checks
This bug happens on GitLab.com.
Possible fixes
I would expect there is test in gitlab source code to check for things like this. :-(