Commit 8ae026a6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'fix-ci-permissions' into 'master'

Fix CI permissions

![Screen_Shot_2015-09-21_at_20.23.16](https://gitlab.com/gitlab-org/gitlab-ce/uploads/6f40699507d0dce148d0054a093f0d63/Screen_Shot_2015-09-21_at_20.23.16.png)

This fixes two problems:
- Allow developers to retry builds
- Hide advanced project options from CI page for non-admin users



See merge request !1379
parents 548b7ce8 071ae261
...@@ -44,6 +44,8 @@ v 8.0.0 (unreleased) ...@@ -44,6 +44,8 @@ v 8.0.0 (unreleased)
- Retrieving oauth token with LDAP credentials - Retrieving oauth token with LDAP credentials
- Load Application settings from running database unless env var USE_DB=false - Load Application settings from running database unless env var USE_DB=false
- Added Drone CI integration (Kirill Zaitsev) - Added Drone CI integration (Kirill Zaitsev)
- Allow developers to retry builds
- Hide advanced project options for non-admin users
- Fail builds if no .gitlab-ci.yml is found - Fail builds if no .gitlab-ci.yml is found
- Refactored service API and added automatically service docs generator (Kirill Zaitsev) - Refactored service API and added automatically service docs generator (Kirill Zaitsev)
- Added web_url key project hook_attrs (Kirill Zaitsev) - Added web_url key project hook_attrs (Kirill Zaitsev)
......
...@@ -38,7 +38,7 @@ module Ci ...@@ -38,7 +38,7 @@ module Ci
end end
def authorize_manage_builds! def authorize_manage_builds!
unless can?(current_user, :admin_project, gl_project) unless can?(current_user, :manage_builds, gl_project)
return page_404 return page_404
end end
end end
......
...@@ -10,44 +10,45 @@ ...@@ -10,44 +10,45 @@
%span %span
Commits Commits
%span.count= @project.commits.count %span.count= @project.commits.count
= nav_link path: 'charts#show' do - if can?(current_user, :admin_project, gl_project)
= link_to ci_project_charts_path(@project) do = nav_link path: 'charts#show' do
= icon('bar-chart fw') = link_to ci_project_charts_path(@project) do
%span = icon('bar-chart fw')
Charts %span
= nav_link path: ['runners#index', 'runners#show', 'runners#edit'] do Charts
= link_to ci_project_runners_path(@project) do = nav_link path: ['runners#index', 'runners#show', 'runners#edit'] do
= icon('cog fw') = link_to ci_project_runners_path(@project) do
%span = icon('cog fw')
Runners %span
= nav_link path: 'variables#show' do Runners
= link_to ci_project_variables_path(@project) do = nav_link path: 'variables#show' do
= icon('code fw') = link_to ci_project_variables_path(@project) do
%span = icon('code fw')
Variables %span
= nav_link path: 'web_hooks#index' do Variables
= link_to ci_project_web_hooks_path(@project) do = nav_link path: 'web_hooks#index' do
= icon('link fw') = link_to ci_project_web_hooks_path(@project) do
%span = icon('link fw')
Web Hooks %span
= nav_link path: 'triggers#index' do Web Hooks
= link_to ci_project_triggers_path(@project) do = nav_link path: 'triggers#index' do
= icon('retweet fw') = link_to ci_project_triggers_path(@project) do
%span = icon('retweet fw')
Triggers %span
= nav_link path: ['services#index', 'services#edit'] do Triggers
= link_to ci_project_services_path(@project) do = nav_link path: ['services#index', 'services#edit'] do
= icon('share fw') = link_to ci_project_services_path(@project) do
%span = icon('share fw')
Services %span
= nav_link path: 'events#index' do Services
= link_to ci_project_events_path(@project) do = nav_link path: 'events#index' do
= icon('book fw') = link_to ci_project_events_path(@project) do
%span = icon('book fw')
Events %span
%li.separate-item Events
= nav_link path: 'projects#edit' do %li.separate-item
= link_to edit_ci_project_path(@project) do = nav_link path: 'projects#edit' do
= icon('cogs fw') = link_to edit_ci_project_path(@project) do
%span = icon('cogs fw')
Settings %span
Settings
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment