Hide "New schedule" button for not privileged users
Summary
On the pipeline schedule page you can see a New schedule button, even if you are not privileged to create new schedules.
Steps to reproduce
- log out from GitLab or use an account which isn't allowed to create new schedules for a project
- go to
$project/pipeline_schedules/
- you see a New schedule button in the upper area of the page (which does fortunately not work)
Example Project
- GitLab CE: https://gitlab.com/gitlab-org/gitlab-ce/pipeline_schedules
- GitLab EE: https://gitlab.com/gitlab-org/gitlab-ee/pipeline_schedules
What is the current bug behavior?
The button should be hidden for not privileged users.
(When clicking on this button you see a 404 page instead of /pipeline_schedules/new
.)
What is the expected correct behavior?
The button should not be displayed for users who are not allowed to create new schedules.