Commit 6dda8592 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Update boards issue creation authorization

parent 5b27e2db
......@@ -50,8 +50,15 @@ module BoardsResponses
end
def authorize_create_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
authorize_action_for!(board.parent, :admin_list)
......
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