Fix: Security issue, queues were not filtered according to project visibility

By default queues are named like the name of the projects.
The previous code was indirectly showing up a project list if listing the queues is enabled in the dashboard (potential information leak).
(cherry picked from commit ea8f4b7a84a494568d0e042dc93b6b10863f65af)