Skip to content

Commit

Permalink
Allow a requestor to modify a request
Browse files Browse the repository at this point in the history
Currently changing the priorities is only allowed if you can write the
target project. This should also be allowed to the creator of the
request.
  • Loading branch information
eduardoj committed May 22, 2019
1 parent ec9c5b3 commit 50013d4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api/app/models/bs_request_permission_check.rb
Expand Up @@ -231,12 +231,14 @@ def cmd_setpriority_permissions
raise SetPriorityNoPermission, 'The request is not in state new or review'
end

return if req.creator == User.session!.login

req.bs_request_actions.each do |action|
set_permissions_for_action(action)
end
return if @write_permission_in_target

raise SetPriorityNoPermission, 'No write permission in target of request actions'
raise SetPriorityNoPermission, "You have not created the request and don't have write permission in target of request actions"
end

def cmd_setincident_permissions
Expand Down

0 comments on commit 50013d4

Please sign in to comment.