Commit 58ac731c authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix Issues#bulk_update

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 5a098e84
......@@ -9,7 +9,10 @@ class Projects::IssuesController < Projects::ApplicationController
before_filter :authorize_write_issue!, only: [:new, :create]
# Allow modify issue
before_filter :authorize_modify_issue!, only: [:edit, :update, :bulk_update]
before_filter :authorize_modify_issue!, only: [:edit, :update]
# Allow issues bulk update
before_filter :authorize_admin_issues!, only: [:bulk_update]
respond_to :html
......@@ -107,8 +110,8 @@ class Projects::IssuesController < Projects::ApplicationController
return render_404 unless can?(current_user, :modify_issue, @issue)
end
def authorize_admin_issue!
return render_404 unless can?(current_user, :admin_issue, @issue)
def authorize_admin_issues!
return render_404 unless can?(current_user, :admin_issue, @project)
end
def module_enabled
......
......@@ -126,6 +126,7 @@ class Ability
:write_merge_request,
:write_wiki,
:modify_issue,
:admin_issue,
:push_code
]
end
......
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