Commit ff07a5ab authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Merge branch 'improve/developer_permissions' into 'master'

Permissions: Developer can manage issue tracker now
parents baccb9a4 237ddd60
v 6.6.0
- Permissions: Developer now can manage issue tracker (modify any issue)
v 6.5.1
- Fix branch selectbox when create merge request from fork
......
......@@ -6,6 +6,7 @@ class Projects::BlobController < Projects::ApplicationController
before_filter :authorize_read_project!
before_filter :authorize_code_access!
before_filter :require_non_empty_project
before_filter :authorize_push!, only: [:destroy]
before_filter :blob
......
class Projects::EditTreeController < Projects::BaseTreeController
before_filter :require_branch_head
before_filter :blob
before_filter :authorize_push!
def show
@last_commit = Gitlab::Git::Commit.last_for_path(@repository, @ref, @path).sha
......
......@@ -9,7 +9,7 @@ class Projects::IssuesController < Projects::ApplicationController
before_filter :authorize_write_issue!, only: [:new, :create]
# Allow modify issue
before_filter :authorize_modify_issue!, only: [:edit, :update]
before_filter :authorize_modify_issue!, only: [:edit, :update, :bulk_update]
respond_to :html
......
class Projects::NewTreeController < Projects::BaseTreeController
before_filter :require_branch_head
before_filter :authorize_push!
def show
end
......
......@@ -125,6 +125,7 @@ class Ability
project_report_rules + [
:write_merge_request,
:write_wiki,
:modify_issue,
:push_code
]
end
......
......@@ -100,6 +100,13 @@
%td.permission-x &#10003;
%td.permission-x &#10003;
%td.permission-x &#10003;
%tr
%td Manage issue tracker
%td
%td
%td.permission-x &#10003;
%td.permission-x &#10003;
%td.permission-x &#10003;
%tr
%td Add new team members
%td
......
......@@ -9,7 +9,7 @@
= link_to truncate(title, length: 40), project_tree_path(@project, path)
- else
= link_to title, '#'
- if @repository.branch_names.include?(@ref)
- if current_user && @repository.branch_names.include?(@ref) && current_user.can?(:push_code, @project)
%li
= link_to project_new_tree_path(@project, @id), title: 'New file', id: 'new-file-link' do
%small
......
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