Pipeline Schedule navigation link should be hidden for those without access

Summary

Users without access to Pipelines can still see a link to Pipeline Schedules

Steps to reproduce

  • Create a public project
  • As a non authenticated user attempt to navigate to this project's pipeline schedules

Example Project

  • https://gitlab.com/issue-reproduce/public-project-hidden-schedule

What is the current bug behavior?

The "Schedules" button in the nav bar is visible. Following it leads to a 404

What is the expected correct behavior?

The "Schedules" button should be hidden if the user does not have permission to view

Output of checks

reproduced on GitLab.com 12.5.0

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Assignee Loading
Time tracking Loading