Skip to content

Instance Security Dashboard displays incomplete error message when failing to add projects

Summary

A user may not have sufficient rights to add certain projects to the Instance Security Dashboard. When this happens, a message should be displayed saying which project(s) couldn't be added.

At the moment, that message only says "Unable to add".

Steps to reproduce

  1. Go to https://staging.gitlab.com/-/security
  2. Click "Edit dashboard"
  3. Search for gitlab-foss
  4. Click the first result
  5. Click "Add projects"
  6. Observe error message

Example Project

See reproduction steps. I'm not sure what the criteria are for what allows a user to add a project to the dashboard, but at least @markrian on staging cannot add the project with id 13083.

What is the current bug behavior?

Error message says "Unable to add"

What is the expected correct behavior?

Error message says "Unable to add gitlab-foss", or perhaps "Unable to add gitlab-org/gitlab-foss"

Relevant logs and/or screenshots

Screenshot_2020-01-14_Security_Dashboard

Output of checks

This bug happens on GitLab.com

Possible fixes

The message is generated in https://gitlab.com/gitlab-org/gitlab/blob/v12.6.3-ee/ee/app/assets/javascripts/security_dashboard/store/modules/project_selector/actions.js#L76.