Commit ff07a5ab8487bce1d8c46f5c4b28ad54ce99d9cd
Exists in
spb-stable
and in
3 other branches
Merge branch 'improve/developer_permissions' into 'master'
Permissions: Developer can manage issue tracker now
Showing
8 changed files
with
16 additions
and
2 deletions
Show diff stats
CHANGELOG
app/controllers/projects/blob_controller.rb
... | ... | @@ -6,6 +6,7 @@ class Projects::BlobController < Projects::ApplicationController |
6 | 6 | before_filter :authorize_read_project! |
7 | 7 | before_filter :authorize_code_access! |
8 | 8 | before_filter :require_non_empty_project |
9 | + before_filter :authorize_push!, only: [:destroy] | |
9 | 10 | |
10 | 11 | before_filter :blob |
11 | 12 | ... | ... |
app/controllers/projects/edit_tree_controller.rb
app/controllers/projects/issues_controller.rb
... | ... | @@ -9,7 +9,7 @@ class Projects::IssuesController < Projects::ApplicationController |
9 | 9 | before_filter :authorize_write_issue!, only: [:new, :create] |
10 | 10 | |
11 | 11 | # Allow modify issue |
12 | - before_filter :authorize_modify_issue!, only: [:edit, :update] | |
12 | + before_filter :authorize_modify_issue!, only: [:edit, :update, :bulk_update] | |
13 | 13 | |
14 | 14 | respond_to :html |
15 | 15 | ... | ... |
app/controllers/projects/new_tree_controller.rb
app/models/ability.rb
app/views/help/permissions.html.haml
... | ... | @@ -101,6 +101,13 @@ |
101 | 101 | %td.permission-x ✓ |
102 | 102 | %td.permission-x ✓ |
103 | 103 | %tr |
104 | + %td Manage issue tracker | |
105 | + %td | |
106 | + %td | |
107 | + %td.permission-x ✓ | |
108 | + %td.permission-x ✓ | |
109 | + %td.permission-x ✓ | |
110 | + %tr | |
104 | 111 | %td Add new team members |
105 | 112 | %td |
106 | 113 | %td | ... | ... |
app/views/projects/tree/_tree.html.haml
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | = link_to truncate(title, length: 40), project_tree_path(@project, path) |
10 | 10 | - else |
11 | 11 | = link_to title, '#' |
12 | - - if @repository.branch_names.include?(@ref) | |
12 | + - if current_user && @repository.branch_names.include?(@ref) && current_user.can?(:push_code, @project) | |
13 | 13 | %li |
14 | 14 | = link_to project_new_tree_path(@project, @id), title: 'New file', id: 'new-file-link' do |
15 | 15 | %small | ... | ... |