Edit Issue Shortcut - Undefined Link
Summary
Pressing the edit shortcut "e" on an issue you don't have permission to edit redirects to /undefined
, which 404s.
Steps to reproduce
- Open an issue you don't have permission to edit
- Press the "e" key on your keyboard
Example Project
https://gitlab.com/deckar01/gitlab-ce-permissions-test/issues/1
What is the current bug behavior?
The page redirects to /undefined
which does not exist and 404s.
What is the expected correct behavior?
The shortcut should be disabled like it is on the merge requests page.
Output of checks
This bug happens on GitLab.com
Possible fixes
I think issues uses the same logic as merge requests. shortcuts_dashboard_navigation.js
is supposed to ignore the navigation request if the URL is not found, but for some reason it is getting the string "undefined" which passes the if(link)
test.
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/33735