Error fetching the dashboard data. Please check your network connection and try again. after upgrade of gitlab.com to 12.0
Steps to reproduce
Run any pipeline on a project with some vulnerabilities. The vulnerabilities show up on the Pipeline > Security tab. But the Project > Security Dashboard shows the error message display above.
I was able to duplicate the issue. It is happening to me when I am a user that has maintainer access to a project, but I do not have access to the group that the project is in.
I traced it down a bit and my guess is that this is due to the Project Security Dashboard now loading like the Group Security Dashboard.
The Groups::Security::ApplicationController is getting hit for loads of the Project Security Dashboard and it authorizes for access to the group security dashboard, but in this case, the user doesn't have this access.
I assume this also covers the cases where a user has access to the project security dashboard, but not the group security dashboard (even as owner of the group)? I'm seeing what may be two manifestations of this as a free gitlab.com user with access to gold/ultimate features on public projects:
For any public project in a group, I see the 404 errors originally described in this issue. Even as the owner of the group, I don't have gold/ultimate features at that level (only the project).
For any public personal project, I get a 500 response for the security dashboard page
In my case, the project is in a group, but the group is not Gold. The project is public so it has Gold level. So effectively the same problem, but wanted to clarify that the group may exist but may still cause the problem due to Less than Gold level.