summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/concerns/boards_responses.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/app/controllers/concerns/boards_responses.rb b/app/controllers/concerns/boards_responses.rb
index b7e4f9b81f1..e6c54e688b6 100644
--- a/app/controllers/concerns/boards_responses.rb
+++ b/app/controllers/concerns/boards_responses.rb
@@ -50,7 +50,14 @@ module BoardsResponses
end
def authorize_create_issue
- authorize_action_for!(project, :admin_issue)
+ board = board_parent.boards.find(issue_params[:board_id])
+ list = board.lists.find(issue_params[:list_id])
+
+ if list.backlog?
+ authorize_action_for!(project, :create_issue)
+ else
+ authorize_action_for!(project, :admin_issue)
+ end
end
def authorize_admin_list