mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-27 21:46:16 +10:00
Update controller filters
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
@@ -6,10 +6,10 @@ class Projects::IssuesController < Projects::ApplicationController
|
||||
before_action :authorize_read_issue!
|
||||
|
||||
# Allow write(create) issue
|
||||
before_action :authorize_write_issue!, only: [:new, :create]
|
||||
before_action :authorize_create_issue!, only: [:new, :create]
|
||||
|
||||
# Allow modify issue
|
||||
before_action :authorize_modify_issue!, only: [:edit, :update]
|
||||
before_action :authorize_update_issue!, only: [:edit, :update]
|
||||
|
||||
# Allow issues bulk update
|
||||
before_action :authorize_admin_issues!, only: [:bulk_update]
|
||||
@@ -122,7 +122,7 @@ class Projects::IssuesController < Projects::ApplicationController
|
||||
end
|
||||
end
|
||||
|
||||
def authorize_modify_issue!
|
||||
def authorize_update_issue!
|
||||
return render_404 unless can?(current_user, :update_issue, @issue)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user